(6.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (4.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateThings (20140428155742)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "things" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "account_id" integer, "created_at" datetime, "updated_at" datetime) SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140428155742"]]  (5.9ms) commit transaction Migrating to CreateMtdeviseAccounts (20150426071228)  (0.0ms) begin transaction  (0.4ms) CREATE TABLE "mtdevise_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime) SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150426071228"]]  (5.4ms) commit transaction Migrating to AddOwnerIdToMtdeviseAccounts (20150426115631)  (0.0ms) begin transaction  (0.4ms) ALTER TABLE "mtdevise_accounts" ADD "owner_id" integer SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150426115631"]]  (5.4ms) commit transaction Migrating to CreateMtdeviseUsers (20150426115910)  (0.0ms) begin transaction  (0.4ms) CREATE TABLE "mtdevise_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password_digest" varchar, "created_at" datetime, "updated_at" datetime) SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150426115910"]]  (7.9ms) commit transaction Migrating to AddDeviseToMtdeviseUsers (20150426143800)  (0.0ms) begin transaction  (0.3ms) ALTER TABLE "mtdevise_users" ADD "encrypted_password" varchar DEFAULT '' NOT NULL  (0.2ms) ALTER TABLE "mtdevise_users" ADD "reset_password_token" varchar  (0.2ms) ALTER TABLE "mtdevise_users" ADD "reset_password_sent_at" datetime  (0.2ms) ALTER TABLE "mtdevise_users" ADD "remember_created_at" datetime  (0.2ms) ALTER TABLE "mtdevise_users" ADD "sign_in_count" integer DEFAULT 0 NOT NULL  (0.1ms) ALTER TABLE "mtdevise_users" ADD "current_sign_in_at" datetime  (0.2ms) ALTER TABLE "mtdevise_users" ADD "last_sign_in_at" datetime  (0.1ms) ALTER TABLE "mtdevise_users" ADD "current_sign_in_ip" varchar  (0.2ms) ALTER TABLE "mtdevise_users" ADD "last_sign_in_ip" varchar  (1.0ms) CREATE UNIQUE INDEX "index_mtdevise_users_on_email" ON "mtdevise_users" ("email")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_email' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_email' AND type='index'  (0.2ms) CREATE UNIQUE INDEX "index_mtdevise_users_on_reset_password_token" ON "mtdevise_users" ("reset_password_token") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150426143800"]]  (8.0ms) commit transaction Migrating to AddSubdomainToMtdeviseAccounts (20150427200506)  (0.0ms) begin transaction  (0.4ms) ALTER TABLE "mtdevise_accounts" ADD "subdomain" varchar  (0.2ms) CREATE INDEX "index_mtdevise_accounts_on_subdomain" ON "mtdevise_accounts" ("subdomain") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150427200506"]]  (5.9ms) commit transaction Migrating to CreateMtdeviseMembers (20150428110406)  (0.0ms) begin transaction  (0.4ms) CREATE TABLE "mtdevise_members" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "account_id" integer, "user_id" integer, "created_at" datetime, "updated_at" datetime) SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150428110406"]]  (4.7ms) commit transaction Migrating to AddConfirmedAtToUsers (20150504181830)  (0.1ms) begin transaction  (0.5ms) ALTER TABLE "mtdevise_users" ADD "confirmed_at" datetime  (0.3ms) ALTER TABLE "mtdevise_users" ADD "confirmation_token" varchar  (0.3ms) ALTER TABLE "mtdevise_users" ADD "confirmation_sent_at" datetime  (0.3ms) ALTER TABLE "mtdevise_users" ADD "unconfirmed_email" varchar SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150504181830"]]  (5.7ms) commit transaction Migrating to RolifyCreateRoles (20150604101617)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "mtdevise_roles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "resource_type" varchar, "created_at" datetime, "updated_at" datetime)   (0.3ms) CREATE TABLE "mtdevise_users_mtdevise_roles" ("user_id" integer, "role_id" integer)  (0.1ms) CREATE INDEX "index_mtdevise_roles_on_name" ON "mtdevise_roles" ("name")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_roles_on_name' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_roles_on_name' AND type='index'  (0.2ms) CREATE INDEX "index_mtdevise_roles_on_name_and_resource_type_and_resourc" ON "mtdevise_roles" ("name", "resource_type", "resource_id")  (0.1ms) CREATE INDEX "index_mtdevise_users_mtdevise_roles_on_user_id_and_role_id" ON "mtdevise_users_mtdevise_roles" ("user_id", "role_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150604101617"]]  (5.0ms) commit transaction Migrating to AddAuthenticationTokenToMtdeviseUsers (20150719125100)  (0.0ms) begin transaction  (0.5ms) ALTER TABLE "mtdevise_users" ADD "authentication_token" varchar  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_reset_password_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_reset_password_token' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_email' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_email' AND type='index'  (0.2ms) CREATE INDEX "index_mtdevise_users_on_authentication_token" ON "mtdevise_users" ("authentication_token") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150719125100"]]  (5.9ms) commit transaction Migrating to AddFirstnameToMtdeviseAccounts (20151231043439)  (0.0ms) begin transaction  (0.4ms) ALTER TABLE "mtdevise_accounts" ADD "firstname" varchar  (0.3ms) ALTER TABLE "mtdevise_accounts" ADD "lastname" varchar  (0.3ms) ALTER TABLE "mtdevise_accounts" ADD "username" varchar SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151231043439"]]  (4.4ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_accounts_on_subdomain' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_accounts_on_subdomain' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_roles_on_name_and_resource_type_and_resourc' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_roles_on_name_and_resource_type_and_resourc' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_roles_on_name' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_roles_on_name' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_authentication_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_authentication_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_reset_password_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_reset_password_token' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_email' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_email' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_mtdevise_roles_on_user_id_and_role_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_mtdevise_roles_on_user_id_and_role_id' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (5.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (4.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "67AKp8Fw5ZmXSo9Pzns-"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$MjIYfm2.fSuvvIeZ.vYeruCQ79o9olLjKxvNvTT9EpgPtLLOAlf1O"], ["confirmed_at", "2016-01-03 04:35:53.874212"], ["authentication_token", "67AKp8Fw5ZmXSo9Pzns-"], ["created_at", "2016-01-03 04:35:53.894790"], ["updated_at", "2016-01-03 04:35:53.894790"]]  (5.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-03 04:35:53.910146"], ["updated_at", "2016-01-03 04:35:53.910146"]]  (5.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:35:53.937909"], ["updated_at", "2016-01-03 04:35:53.937909"]]  (6.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test2@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "qdvMqa39muFQszUFN1x-"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test2@example.com"], ["encrypted_password", "$2a$04$2BZ/wxnrFl1Am5pMhLfLmu.J4ST5MATFRUPMdGxXDvuMsBNE4PXcO"], ["confirmed_at", "2016-01-03 04:35:53.947178"], ["authentication_token", "qdvMqa39muFQszUFN1x-"], ["created_at", "2016-01-03 04:35:53.948974"], ["updated_at", "2016-01-03 04:35:53.948974"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 2], ["created_at", "2016-01-03 04:35:53.958171"], ["updated_at", "2016-01-03 04:35:53.958171"]]  (8.3ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-03 04:35:53.968762"], ["updated_at", "2016-01-03 04:35:53.968762"]]  (6.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-03 04:35:53.979159"], ["updated_at", "2016-01-03 04:35:53.979159"]]  (4.7ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-03 04:35:53.985223"], ["updated_at", "2016-01-03 04:35:53.985223"]]  (5.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:35:54 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (10.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (98.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.6ms) Completed 200 OK in 6434ms (Views: 6420.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test1@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:00.466238"], ["current_sign_in_at", "2016-01-03 04:36:00.466238"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:00.467012"], ["id", 1]]  (6.5ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 33ms (ActiveRecord: 7.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (6.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 16ms (Views: 12.2ms | ActiveRecord: 0.4ms) Started GET "/things" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test1"]] Processing by ThingsController#index as HTML Thing Load (0.1ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 1]] Rendered things/index.html.erb within layouts/application (0.9ms) Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.1ms)  (8.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test4@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "kdL2bvvMsSoxQrZ8-CJi"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test4@example.com"], ["encrypted_password", "$2a$04$BJyYfOmAuGMj36FzAKkpTeQ7F5xAKC3btP/j0m6Cs2ICmQI2SKtNa"], ["confirmed_at", "2016-01-03 04:36:00.597727"], ["authentication_token", "kdL2bvvMsSoxQrZ8-CJi"], ["created_at", "2016-01-03 04:36:00.600068"], ["updated_at", "2016-01-03 04:36:00.600068"]]  (6.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:00.609898"], ["updated_at", "2016-01-03 04:36:00.609898"]]  (6.7ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:00.619331"], ["updated_at", "2016-01-03 04:36:00.619331"]]  (6.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test5@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "ekRCbHmypbn3zts7pKKx"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test5@example.com"], ["encrypted_password", "$2a$04$KCw1yozKDUilAo5rleTkZeoqmLVPyQXVMCIf.wEFqCVKb4dwbLzka"], ["confirmed_at", "2016-01-03 04:36:00.628995"], ["authentication_token", "ekRCbHmypbn3zts7pKKx"], ["created_at", "2016-01-03 04:36:00.630704"], ["updated_at", "2016-01-03 04:36:00.630704"]]  (4.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 2], ["created_at", "2016-01-03 04:36:00.639077"], ["updated_at", "2016-01-03 04:36:00.639077"]]  (4.7ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-03 04:36:00.646169"], ["updated_at", "2016-01-03 04:36:00.646169"]]  (8.3ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-03 04:36:00.655994"], ["updated_at", "2016-01-03 04:36:00.655994"]]  (4.7ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-03 04:36:00.661966"], ["updated_at", "2016-01-03 04:36:00.661966"]]  (9.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test5@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test5@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:00.697461"], ["current_sign_in_at", "2016-01-03 04:36:00.697461"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:00.698155"], ["id", 2]]  (4.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 4.9ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 2]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by ThingsController#index as HTML Thing Load (0.1ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 2]] Rendered things/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (6.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.7ms) DELETE FROM sqlite_sequence where name = 'things';  (9.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (11.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (4.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (10.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test7@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "az5Rgc4GHp9fGv2dxoAY"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test7@example.com"], ["encrypted_password", "$2a$04$/y5OcjdWTdQN.emSu/8D5u48Dk3IqR5GP3F/q.VCycLb3gpcIo1gi"], ["confirmed_at", "2016-01-03 04:36:00.831275"], ["authentication_token", "az5Rgc4GHp9fGv2dxoAY"], ["created_at", "2016-01-03 04:36:00.833431"], ["updated_at", "2016-01-03 04:36:00.833431"]]  (8.4ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:00.845450"], ["updated_at", "2016-01-03 04:36:00.845450"]]  (6.0ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:00.853971"], ["updated_at", "2016-01-03 04:36:00.853971"]]  (6.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test7@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test7@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:00.884908"], ["current_sign_in_at", "2016-01-03 04:36:00.884908"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:00.885540"], ["id", 1]]  (6.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:00 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms)  (6.5ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test9@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "qMj3pXybKGzJsPssaXRs"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test9@example.com"], ["encrypted_password", "$2a$04$Mld1nhKs/QTFWNsbPiGeS.EnWJ.11xCnkssu0v2L/hWMzse2WHjUG"], ["confirmed_at", "2016-01-03 04:36:00.969586"], ["authentication_token", "qMj3pXybKGzJsPssaXRs"], ["created_at", "2016-01-03 04:36:00.971832"], ["updated_at", "2016-01-03 04:36:00.971832"]]  (8.6ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:00.984166"], ["updated_at", "2016-01-03 04:36:00.984166"]]  (7.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:00.994452"], ["updated_at", "2016-01-03 04:36:00.994452"]]  (4.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test9@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.0ms)  (7.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.1ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.4ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.1ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.8ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test10@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "idVwK4ZV_EbZ_R2FdNCG"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test10@example.com"], ["encrypted_password", "$2a$04$eAWTXT19qA1LWr9U0lCxTO6Dbs7ToMNdtXb/tKLw1Yx3GXwuMRldS"], ["confirmed_at", "2016-01-03 04:36:01.142740"], ["authentication_token", "idVwK4ZV_EbZ_R2FdNCG"], ["created_at", "2016-01-03 04:36:01.145063"], ["updated_at", "2016-01-03 04:36:01.145063"]]  (6.2ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:01.155499"], ["updated_at", "2016-01-03 04:36:01.155499"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:01.163404"], ["updated_at", "2016-01-03 04:36:01.163404"]]  (4.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (9.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 11.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test10@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test10@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:01.196531"], ["current_sign_in_at", "2016-01-03 04:36:01.196531"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:01.197279"], ["id", 1]]  (6.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 7.0ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 7.3ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test7"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 4.7ms | ActiveRecord: 0.9ms)  (5.4ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.3ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test12@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "J92VTfCtAUH4yVLHyn5r"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test12@example.com"], ["encrypted_password", "$2a$04$Bh1yp.EaJk08/q927.BCIejN6qqpImzBYMZfwJHylJP.NfQ1UoVqq"], ["confirmed_at", "2016-01-03 04:36:01.320688"], ["authentication_token", "J92VTfCtAUH4yVLHyn5r"], ["created_at", "2016-01-03 04:36:01.323043"], ["updated_at", "2016-01-03 04:36:01.323043"]]  (5.1ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:01.332331"], ["updated_at", "2016-01-03 04:36:01.332331"]]  (6.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:01.341605"], ["updated_at", "2016-01-03 04:36:01.341605"]]  (8.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 11.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test12@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test12@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:01.378765"], ["current_sign_in_at", "2016-01-03 04:36:01.378765"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:01.379502"], ["id", 1]]  (8.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 18ms (ActiveRecord: 9.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["created_at", "2016-01-03 04:36:01.423822"], ["updated_at", "2016-01-03 04:36:01.423822"]]  (6.1ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 1], ["created_at", "2016-01-03 04:36:01.435439"], ["updated_at", "2016-01-03 04:36:01.435439"]]  (4.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 SQL (0.2ms) UPDATE "mtdevise_accounts" SET "owner_id" = ?, "updated_at" = ? WHERE "mtdevise_accounts"."id" = ? [["owner_id", 1], ["updated_at", "2016-01-03 04:36:01.444111"], ["id", 2]]  (8.5ms) commit transaction Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2], ["created_at", "2016-01-03 04:36:01.464645"], ["updated_at", "2016-01-03 04:36:01.464645"]]  (7.6ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 77ms (ActiveRecord: 38.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.2ms)  (4.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (4.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "UnWBbszvuxjXLJpq4rTu"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test14@example.com"], ["encrypted_password", "$2a$04$IjNwqxB62i/iIhaZieijYO5d0YPy.RqY6950RsoevYFMFGyUWnEgG"], ["confirmed_at", "2016-01-03 04:36:01.571445"], ["authentication_token", "UnWBbszvuxjXLJpq4rTu"], ["created_at", "2016-01-03 04:36:01.573654"], ["updated_at", "2016-01-03 04:36:01.573654"]]  (5.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:01.597018"], ["updated_at", "2016-01-03 04:36:01.597018"]]  (6.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:01.606300"], ["updated_at", "2016-01-03 04:36:01.606300"]]  (4.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test14@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test14@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:01.636565"], ["current_sign_in_at", "2016-01-03 04:36:01.636565"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:01.637243"], ["id", 1]]  (6.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 6.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"admin"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 4.7ms | ActiveRecord: 0.9ms)  (8.3ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.4ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.8ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.7ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test16@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "GSGytr5cTyzWrLxho7oE"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test16@example.com"], ["encrypted_password", "$2a$04$wWe4xBYEKjNGVbuiISTexulB1qpYAudVra6qElYRoiMI.zQYraL0W"], ["confirmed_at", "2016-01-03 04:36:01.747067"], ["authentication_token", "GSGytr5cTyzWrLxho7oE"], ["created_at", "2016-01-03 04:36:01.749520"], ["updated_at", "2016-01-03 04:36:01.749520"]]  (6.2ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:01.760204"], ["updated_at", "2016-01-03 04:36:01.760204"]]  (6.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:01.769836"], ["updated_at", "2016-01-03 04:36:01.769836"]]  (5.9ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (10.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 14ms (Views: 12.6ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test16@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test16@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:01.806797"], ["current_sign_in_at", "2016-01-03 04:36:01.806797"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:01.807656"], ["id", 1]]  (6.1ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 17ms (ActiveRecord: 6.6ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (3.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 6.3ms | ActiveRecord: 0.3ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.2ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:01 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>""}, "commit"=>"Create Account"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 5.2ms | ActiveRecord: 0.9ms)  (10.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (20.6ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (25.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (20.7ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (26.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (27.8ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (30.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (24.4ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (14.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (10.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.3ms) DELETE FROM "mtdevise_accounts";  (0.3ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.0ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.6ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.9ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test18@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "MVnx3yy67KN5PGzFPCjF"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test18@example.com"], ["encrypted_password", "$2a$04$iSQspfiLoVjPvUdywQNmk.27WI9wQbQmGQHhG8sBceH3fL4AbMQSq"], ["confirmed_at", "2016-01-03 04:36:02.122474"], ["authentication_token", "MVnx3yy67KN5PGzFPCjF"], ["created_at", "2016-01-03 04:36:02.125010"], ["updated_at", "2016-01-03 04:36:02.125010"]]  (6.2ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:02.135855"], ["updated_at", "2016-01-03 04:36:02.135855"]]  (6.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:02.145135"], ["updated_at", "2016-01-03 04:36:02.145135"]]  (5.9ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test19@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "EsDxdmrpxNrthG6yCPNp"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test19@example.com"], ["encrypted_password", "$2a$04$APo9BelSHCC0Rr1lycvzPet14ddZBaUEw2aqALFiQVlWhQHiXw0wu"], ["confirmed_at", "2016-01-03 04:36:02.154699"], ["authentication_token", "EsDxdmrpxNrthG6yCPNp"], ["created_at", "2016-01-03 04:36:02.157082"], ["updated_at", "2016-01-03 04:36:02.157082"]]  (6.4ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 2], ["created_at", "2016-01-03 04:36:02.167658"], ["updated_at", "2016-01-03 04:36:02.167658"]]  (8.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-03 04:36:02.179236"], ["updated_at", "2016-01-03 04:36:02.179236"]]  (4.9ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test11"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.3ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test11"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.3ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test11"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test11"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (10.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 14ms (Views: 12.6ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test11"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test19@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test11"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test11"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test19@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.6ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test19@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test11"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (9.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 15ms (Views: 12.3ms | ActiveRecord: 0.0ms)  (4.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (4.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.7ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.0ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test20@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "3kAxFy5zcxDWjrc7dNWz"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test20@example.com"], ["encrypted_password", "$2a$04$PJTXBoJNcBVirSp1Y7vMvOQ0k8lxatbvt9mPjhwJGRiSjxdvWn0iK"], ["confirmed_at", "2016-01-03 04:36:02.313608"], ["authentication_token", "3kAxFy5zcxDWjrc7dNWz"], ["created_at", "2016-01-03 04:36:02.315933"], ["updated_at", "2016-01-03 04:36:02.315933"]]  (6.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:02.326440"], ["updated_at", "2016-01-03 04:36:02.326440"]]  (4.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:02.334070"], ["updated_at", "2016-01-03 04:36:02.334070"]]  (5.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.3ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test20@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test13"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test20@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:02.373546"], ["current_sign_in_at", "2016-01-03 04:36:02.373546"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:02.374210"], ["id", 1]]  (4.7ms) commit transaction Redirected to http://test13.example.com/ Completed 302 Found in 12ms (ActiveRecord: 5.2ms) Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 8.2ms | ActiveRecord: 0.2ms)  (5.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test21@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "weapV1LzxzxbYyahz7dJ"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test21@example.com"], ["encrypted_password", "$2a$04$Klzq55.QW/E9Rg27M7rlguMXFMHPnYsMtDMHa7eO5ULDzad9z0ChC"], ["confirmed_at", "2016-01-03 04:36:02.454563"], ["authentication_token", "weapV1LzxzxbYyahz7dJ"], ["created_at", "2016-01-03 04:36:02.456751"], ["updated_at", "2016-01-03 04:36:02.456751"]]  (6.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:02.466892"], ["updated_at", "2016-01-03 04:36:02.466892"]]  (4.5ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:02.474123"], ["updated_at", "2016-01-03 04:36:02.474123"]]  (7.5ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.5ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test21@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test14"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test21@example.com"]] Completed 401 Unauthorized in 4ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test21@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.0ms)  (5.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (10.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test22@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "QS6dkHeUQWoRrQFErRHn"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test22@example.com"], ["encrypted_password", "$2a$04$QFim568W.PKmtYYbL4Wb0eUfVQnPzbv27lVFPWQZmYkvqeme.cfgK"], ["confirmed_at", "2016-01-03 04:36:02.591074"], ["authentication_token", "QS6dkHeUQWoRrQFErRHn"], ["created_at", "2016-01-03 04:36:02.593376"], ["updated_at", "2016-01-03 04:36:02.593376"]]  (5.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:02.603110"], ["updated_at", "2016-01-03 04:36:02.603110"]]  (4.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:02.610574"], ["updated_at", "2016-01-03 04:36:02.610574"]]  (5.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test15"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test15"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test15"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test15"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:02 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test15"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test15"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test15"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test15"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 13ms (Views: 10.0ms | ActiveRecord: 0.0ms)  (10.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (10.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (10.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "C5jNiR7tcswqjBCHgAPy"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "967b5e1ca7bcf276116293494519669af1328d5373660537dcd0fb5e5775d3b1"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$PrMSCCVGWSRNWd.GG5Kew.NOPFJZlCL7h3yyHiVmaKhgFlQumGRsy"], ["authentication_token", "C5jNiR7tcswqjBCHgAPy"], ["created_at", "2016-01-03 04:36:02.775187"], ["updated_at", "2016-01-03 04:36:02.775187"], ["confirmation_token", "wtVjE5Bh9x8TKhLFm7Sz"], ["confirmation_sent_at", "2016-01-03 04:36:02.962168"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (5.1ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 269.6ms Sent mail to user@example.com (14.0ms) Date: Sun, 03 Jan 2016 04:36:03 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <5688a5333d61e_4ca19df31434337@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:03.258484"], ["updated_at", "2016-01-03 04:36:03.258484"]]  (5.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:03.266636"], ["updated_at", "2016-01-03 04:36:03.266636"]]  (4.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-03 04:36:03.272436"], ["updated_at", "2016-01-03 04:36:03.272826"], ["id", 1]]  (5.9ms) commit transaction Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (6.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (10.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "QAG27zGukJdHRkBhsgAp"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$fQk4.LEJbK3yFvNhou15dumD1uIAFnIiIeKCfkhWkIGByNE7Qz83e"], ["confirmed_at", "2016-01-03 04:36:03.382529"], ["authentication_token", "QAG27zGukJdHRkBhsgAp"], ["created_at", "2016-01-03 04:36:03.384623"], ["updated_at", "2016-01-03 04:36:03.384623"]]  (5.9ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:03.415435"], ["current_sign_in_at", "2016-01-03 04:36:03.415435"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:03.416059"], ["id", 1]]  (5.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.0ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_if_coming_form_sign_up rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.1ms)  (6.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (1.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>""}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 15ms (Views: 5.3ms | ActiveRecord: 0.9ms)  (4.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "S65_bedNnSBKUKDoxwZB"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "0f6d6d0c53fc5f4e12c58523d2cfb6135786138bef0149d005425357d77d9f1d"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "mtdevise@example.com"], ["encrypted_password", "$2a$04$u8cv68.OzB/OFvV7eCgiyeM3DC1ckj5Ul4htneqdLf6LwgUlHmSQ6"], ["authentication_token", "S65_bedNnSBKUKDoxwZB"], ["created_at", "2016-01-03 04:36:03.618120"], ["updated_at", "2016-01-03 04:36:03.618120"], ["confirmation_token", "3r212Tq3_jv9yWLyug5m"], ["confirmation_sent_at", "2016-01-03 04:36:03.618796"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.8ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 5.0ms Sent mail to mtdevise@example.com (2.3ms) Date: Sun, 03 Jan 2016 04:36:03 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: mtdevise@example.com Message-ID: <5688a53398e81_4ca19df314344c8@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome mtdevise@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:03.627762"], ["updated_at", "2016-01-03 04:36:03.627762"]]  (10.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:03.641208"], ["updated_at", "2016-01-03 04:36:03.641208"]]  (6.1ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-03 04:36:03.648283"], ["updated_at", "2016-01-03 04:36:03.648671"], ["id", 1]]  (5.9ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-03 04:36:03.659194"], ["updated_at", "2016-01-03 04:36:03.659194"]]  (4.8ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (4.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:03.673903"], ["current_sign_in_at", "2016-01-03 04:36:03.673903"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:03.674466"], ["id", 1]]  (4.8ms) commit transaction Redirected to http://test.example.com/ Completed 302 Found in 72ms (ActiveRecord: 39.4ms) Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 4ms (Views: 2.6ms | ActiveRecord: 0.2ms)  (4.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "HkWawq6F1jrT4PgDBGJe"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test23@example.com"], ["encrypted_password", "$2a$04$xtOxTaNNDoVsBL6bxrmp9OzWkocYTl55rGe1OrdZ5F2mjGT.k.YYG"], ["confirmed_at", "2016-01-03 04:36:03.762803"], ["authentication_token", "HkWawq6F1jrT4PgDBGJe"], ["created_at", "2016-01-03 04:36:03.764841"], ["updated_at", "2016-01-03 04:36:03.764841"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:03.774081"], ["updated_at", "2016-01-03 04:36:03.774081"]]  (6.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:03.782764"], ["updated_at", "2016-01-03 04:36:03.782764"]]  (4.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"another name", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"test23@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"anothersubdomain"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 16ms (Views: 5.6ms | ActiveRecord: 0.9ms)  (8.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 20ms (Views: 18.3ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:03 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"admin"}, "commit"=>"Create Account"}  (0.5ms) begin transaction Mtdevise::User Exists (0.4ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.5ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (9.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 28ms (Views: 12.7ms | ActiveRecord: 2.1ms)  (4.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (4.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-03 04:36:04.005886"], ["updated_at", "2016-01-03 04:36:04.005886"]]  (5.9ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (5.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 19ms (Views: 7.1ms | ActiveRecord: 1.1ms)  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (4.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (4.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (4.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms)  (7.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms)  (9.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (4.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.0ms)  (6.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (4.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "mLmaUGvrnpyzss8HP6xk"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$NaOZq.7l7SlcIKr6qU229e9.vaoSMtf.LxczNEPxfHBlcC9fuoDxi"], ["confirmed_at", "2016-01-03 04:36:04.412417"], ["authentication_token", "mLmaUGvrnpyzss8HP6xk"], ["created_at", "2016-01-03 04:36:04.414634"], ["updated_at", "2016-01-03 04:36:04.414634"]]  (8.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:04.447854"], ["current_sign_in_at", "2016-01-03 04:36:04.447854"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:04.448524"], ["id", 1]]  (8.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 17ms (ActiveRecord: 9.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms) Started GET "/" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::WelcomeController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_logged_in_users_to_account_page rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms)  (5.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (10.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (4.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms)  (6.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (10.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (4.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "xVoqTdbCZksx9J-AQbyq"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$uD9h4z5m3cKX4uxPkACvkedyHc3N8sblfN2MJa6yv95UnhW4D1fjS"], ["confirmed_at", "2016-01-03 04:36:04.648715"], ["authentication_token", "xVoqTdbCZksx9J-AQbyq"], ["created_at", "2016-01-03 04:36:04.650787"], ["updated_at", "2016-01-03 04:36:04.650787"]]  (6.9ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:04.661321"], ["updated_at", "2016-01-03 04:36:04.661321"]]  (9.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:04.673174"], ["updated_at", "2016-01-03 04:36:04.673174"]]  (6.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test24@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test24@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:04.705341"], ["current_sign_in_at", "2016-01-03 04:36:04.705341"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:04.706038"], ["id", 1]]  (4.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 5.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 04:36:04 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.2ms)  (5.4ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (11.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (8.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (4.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "jr4E_JToEe5NbXb55Ue1"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "f4ffae4dc602617b1610b3a229f152fa37e021b0805ef834067fea2a3067a879"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$tLkfGZsnidWC2vl3in/lluWzdbawgnr9BZ0yCro.wbeSiFpn084ri"], ["authentication_token", "jr4E_JToEe5NbXb55Ue1"], ["created_at", "2016-01-03 04:36:04.854803"], ["updated_at", "2016-01-03 04:36:04.854803"], ["confirmation_token", "WvDsy5E4w2DSgSZe7bHj"], ["confirmation_sent_at", "2016-01-03 04:36:04.855533"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.4ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.7ms Sent mail to bb@gmail.com (2.3ms) Date: Sun, 03 Jan 2016 04:36:04 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <5688a534d29e4_4ca19df314345df@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:04.864178"], ["updated_at", "2016-01-03 04:36:04.864178"]]  (6.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:04.872938"], ["updated_at", "2016-01-03 04:36:04.872938"]]  (7.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-03 04:36:04.881721"], ["updated_at", "2016-01-03 04:36:04.882102"], ["id", 1]]  (4.6ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-03 04:36:04.891513"], ["updated_at", "2016-01-03 04:36:04.891513"]]  (6.5ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (5.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:04.909236"], ["current_sign_in_at", "2016-01-03 04:36:04.909236"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:04.909732"], ["id", 1]]  (5.8ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 73ms (ActiveRecord: 39.4ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (12.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (4.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "sgQAr_DA8Zi7X5YZRCtu"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "bf6f588196763a0f3fd3d85df2181b30c2361efb46ca0ad58e6e542a1695861f"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$IB/GVeLMQyf/vfw.GChmtOJzccC51iFs1pmZEzugBZNYgi.oEwvXq"], ["authentication_token", "sgQAr_DA8Zi7X5YZRCtu"], ["created_at", "2016-01-03 04:36:05.009404"], ["updated_at", "2016-01-03 04:36:05.009404"], ["confirmation_token", "XfbSGxNgxdPUzocZB-9Q"], ["confirmation_sent_at", "2016-01-03 04:36:05.010118"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.6ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.8ms Sent mail to bb@gmail.com (2.6ms) Date: Sun, 03 Jan 2016 04:36:05 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <5688a53544be_4ca19df31434676@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-03 04:36:05.019281"], ["updated_at", "2016-01-03 04:36:05.019281"]]  (5.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 04:36:05.026986"], ["updated_at", "2016-01-03 04:36:05.026986"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-03 04:36:05.035090"], ["updated_at", "2016-01-03 04:36:05.035513"], ["id", 1]]  (4.7ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-03 04:36:05.044713"], ["updated_at", "2016-01-03 04:36:05.044713"]]  (6.5ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (13.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 04:36:05.069619"], ["current_sign_in_at", "2016-01-03 04:36:05.069619"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-03 04:36:05.070164"], ["id", 1]]  (4.5ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 78ms (ActiveRecord: 43.4ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (4.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (8.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.4ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "qENqax7KSSaeCNiPrkym"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "54f3d2313f72533998a207182e5e345b3d3c4273c404314f81e3ae3057128ed8"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$6rc7PmamhDcgJAQi2gF3sObya2hDdYxMINzMduU.e/CKAVrSBtH.O"], ["authentication_token", "qENqax7KSSaeCNiPrkym"], ["created_at", "2016-01-03 23:33:45.487479"], ["updated_at", "2016-01-03 23:33:45.487479"], ["confirmation_token", "tihDemTetfyiDZGzde3f"], ["confirmation_sent_at", "2016-01-03 23:33:45.683400"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (5.7ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 195.1ms Sent mail to user@example.com (8.7ms) Date: Sun, 03 Jan 2016 23:33:45 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <5689afd9da656_45cd1932c999f@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.3ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:45.898488"], ["updated_at", "2016-01-03 23:33:45.898488"]]  (12.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:45.931156"], ["updated_at", "2016-01-03 23:33:45.931156"]]  (7.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-03 23:33:45.940069"], ["updated_at", "2016-01-03 23:33:45.940455"], ["id", 1]]  (10.3ms) commit transaction Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (10.2ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (8.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:46 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (6.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.6ms) Completed 200 OK in 6147ms (Views: 6134.5ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (9.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (59.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 68ms (Views: 65.9ms | ActiveRecord: 0.0ms)  (7.3ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (5.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.9ms | ActiveRecord: 0.0ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "sc39C6Xa3My68ExsD8F-"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$GsxFs/PmPeKRJjmRsAv/Ou1S19.2M5i01K5wDYLXvBDyNmmLjgnVi"], ["confirmed_at", "2016-01-03 23:33:52.508427"], ["authentication_token", "sc39C6Xa3My68ExsD8F-"], ["created_at", "2016-01-03 23:33:52.510772"], ["updated_at", "2016-01-03 23:33:52.510772"]]  (7.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:52.545557"], ["current_sign_in_at", "2016-01-03 23:33:52.545557"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:52.546211"], ["id", 1]]  (5.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 20ms (ActiveRecord: 6.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (5.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 7.4ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Mtdevise::WelcomeController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_logged_in_users_to_account_page rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:52 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.1ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.9ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (10.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "-CzU_vLEZLXdgqdp-77T"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "5f48b1633d2cac22fecba7767ccd66b180b3b4ce15ccaac72019355f2e96635f"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$4Ks0mhHfq0OUyE/m5CvO.OZGDBktwXnMYkLbAUXmwW0zsCU8YeW9y"], ["authentication_token", "-CzU_vLEZLXdgqdp-77T"], ["created_at", "2016-01-03 23:33:52.705306"], ["updated_at", "2016-01-03 23:33:52.705306"], ["confirmation_token", "2uvXGB3ssujy3MyaCJzQ"], ["confirmation_sent_at", "2016-01-03 23:33:52.705895"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (2.8ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.1ms Sent mail to bb@gmail.com (2.2ms) Date: Sun, 03 Jan 2016 23:33:52 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <5689afe0adea8_45cd1932c10053@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:52.713700"], ["updated_at", "2016-01-03 23:33:52.713700"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:52.723451"], ["updated_at", "2016-01-03 23:33:52.723451"]]  (5.7ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-03 23:33:52.730125"], ["updated_at", "2016-01-03 23:33:52.730508"], ["id", 1]]  (5.3ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-03 23:33:52.748195"], ["updated_at", "2016-01-03 23:33:52.748195"]]  (7.3ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (8.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:52.775079"], ["current_sign_in_at", "2016-01-03 23:33:52.775079"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:52.775525"], ["id", 1]]  (6.7ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 87ms (ActiveRecord: 43.9ms) Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "wvzrMeEowsbRPuw1Ffi6"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "773e7813c4be31ecbc8a6d6b1c8555d45615f79e25796238837057301c76558d"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$DS4OQliKGxq.SSF/DVo9We0CyoGNQ4Gj8zzVu0sd2CTN0PBQR2K1."], ["authentication_token", "wvzrMeEowsbRPuw1Ffi6"], ["created_at", "2016-01-03 23:33:52.871681"], ["updated_at", "2016-01-03 23:33:52.871681"], ["confirmation_token", "He_dymxxbJHMKqdnXD6x"], ["confirmation_sent_at", "2016-01-03 23:33:52.872361"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (2.9ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.0ms Sent mail to bb@gmail.com (2.1ms) Date: Sun, 03 Jan 2016 23:33:52 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <5689afe0d6826_45cd1932c101c2@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:52.879970"], ["updated_at", "2016-01-03 23:33:52.879970"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:52.889798"], ["updated_at", "2016-01-03 23:33:52.889798"]]  (8.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-03 23:33:52.899678"], ["updated_at", "2016-01-03 23:33:52.900026"], ["id", 1]]  (7.0ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-03 23:33:52.911052"], ["updated_at", "2016-01-03 23:33:52.911052"]]  (5.9ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:52.928967"], ["current_sign_in_at", "2016-01-03 23:33:52.928967"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:52.929422"], ["id", 1]]  (6.8ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 75ms (ActiveRecord: 45.1ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (5.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "MhqqtsEmcZqXDDfK-hVm"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$B12ISHAyaVPEqtOk5WUvi.qnlQ6t.iGGEywFCmav2oO0ewdpi2NQ2"], ["confirmed_at", "2016-01-03 23:33:53.064295"], ["authentication_token", "MhqqtsEmcZqXDDfK-hVm"], ["created_at", "2016-01-03 23:33:53.066364"], ["updated_at", "2016-01-03 23:33:53.066364"]]  (6.1ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:53.096571"], ["current_sign_in_at", "2016-01-03 23:33:53.096571"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:53.097139"], ["id", 1]]  (7.3ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.6ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.1ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_if_coming_form_sign_up rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.5ms | ActiveRecord: 0.1ms)  (7.1ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"admin"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 15ms (Views: 4.7ms | ActiveRecord: 0.8ms)  (5.5ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-03 23:33:53.274842"], ["updated_at", "2016-01-03 23:33:53.274842"]]  (8.6ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (1.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 16ms (Views: 6.0ms | ActiveRecord: 0.9ms)  (7.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 5.0ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>""}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 15ms (Views: 5.3ms | ActiveRecord: 0.9ms)  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "j3mi16VmxVF1JmH3Jt26"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$q3hk.6S87Yyd6XIoPH5x8.TaEKih/Xwa5L.vwDvi7l/K/SSr2HPc."], ["confirmed_at", "2016-01-03 23:33:53.504584"], ["authentication_token", "j3mi16VmxVF1JmH3Jt26"], ["created_at", "2016-01-03 23:33:53.506871"], ["updated_at", "2016-01-03 23:33:53.506871"]]  (7.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:53.518345"], ["updated_at", "2016-01-03 23:33:53.518345"]]  (5.7ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:53.526564"], ["updated_at", "2016-01-03 23:33:53.526564"]]  (5.5ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"another name", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"anothersubdomain"}, "commit"=>"Create Account"}  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 15ms (Views: 5.0ms | ActiveRecord: 0.8ms)  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 5.0ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "SEP-vn-i7Y2KRUwspn13"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "2e4877e7e84d21be1b6b6ab20a54938e57f96050c78c92c03b5306373dc10d1f"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "mtdevise@example.com"], ["encrypted_password", "$2a$04$o4lDRJHJ4RRLQo/AMfjyu.Rd87RDxvyW83qcbGAQCPnU/nAqkqpf."], ["authentication_token", "SEP-vn-i7Y2KRUwspn13"], ["created_at", "2016-01-03 23:33:53.681468"], ["updated_at", "2016-01-03 23:33:53.681468"], ["confirmation_token", "9-d61Qo3JNSMmnFU4Zm3"], ["confirmation_sent_at", "2016-01-03 23:33:53.682193"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.4ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.6ms Sent mail to mtdevise@example.com (2.3ms) Date: Sun, 03 Jan 2016 23:33:53 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: mtdevise@example.com Message-ID: <5689afe1a848b_45cd1932c1024a@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome mtdevise@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:53.690753"], ["updated_at", "2016-01-03 23:33:53.690753"]]  (5.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:53.699330"], ["updated_at", "2016-01-03 23:33:53.699330"]]  (5.6ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-03 23:33:53.705889"], ["updated_at", "2016-01-03 23:33:53.706282"], ["id", 1]]  (8.6ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-03 23:33:53.719408"], ["updated_at", "2016-01-03 23:33:53.719408"]]  (7.4ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (5.6ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:53.738256"], ["current_sign_in_at", "2016-01-03 23:33:53.738256"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:53.738757"], ["id", 1]]  (5.7ms) commit transaction Redirected to http://test.example.com/ Completed 302 Found in 72ms (ActiveRecord: 41.0ms) Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:53 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 8ms (Views: 6.9ms | ActiveRecord: 0.2ms)  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (10.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (8.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test2@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "xaDUos1cumYvqZ1_LbfU"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test2@example.com"], ["encrypted_password", "$2a$04$sniyHRw/B5N.hyb6uzCX5.yd8yGQYyRG54A3FJkekXNYsoI/f2DMu"], ["confirmed_at", "2016-01-03 23:33:53.983205"], ["authentication_token", "xaDUos1cumYvqZ1_LbfU"], ["created_at", "2016-01-03 23:33:53.985310"], ["updated_at", "2016-01-03 23:33:53.985310"]]  (8.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:53.997186"], ["updated_at", "2016-01-03 23:33:53.997186"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:54.006819"], ["updated_at", "2016-01-03 23:33:54.006819"]]  (5.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test2@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test2@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:54.037864"], ["current_sign_in_at", "2016-01-03 23:33:54.037864"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:54.038552"], ["id", 1]]  (5.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"admin"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 3.8ms | ActiveRecord: 0.7ms)  (7.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.8ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test4@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "JsyFF6UPG_t3dYvDuz6U"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test4@example.com"], ["encrypted_password", "$2a$04$EPJbQW4GWNcBcmokTwzFu.KMmnVTT1zAC9B1.HX1yi3ot5X7pT6aG"], ["confirmed_at", "2016-01-03 23:33:54.156759"], ["authentication_token", "JsyFF6UPG_t3dYvDuz6U"], ["created_at", "2016-01-03 23:33:54.158608"], ["updated_at", "2016-01-03 23:33:54.158608"]]  (6.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:54.168355"], ["updated_at", "2016-01-03 23:33:54.168355"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:54.178401"], ["updated_at", "2016-01-03 23:33:54.178401"]]  (5.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test4@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test4@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:54.208075"], ["current_sign_in_at", "2016-01-03 23:33:54.208075"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:54.208643"], ["id", 1]]  (7.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.9ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.5ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test3"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 9ms (Views: 3.6ms | ActiveRecord: 0.7ms)  (7.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test6@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "zG7Ka6arZzSJ_2ntL5GP"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test6@example.com"], ["encrypted_password", "$2a$04$B84zLQeaVIvMhEBC5gPgBubDqMOBsDaYeIKFI8bHiGu8m1pSPuVT."], ["confirmed_at", "2016-01-03 23:33:54.324259"], ["authentication_token", "zG7Ka6arZzSJ_2ntL5GP"], ["created_at", "2016-01-03 23:33:54.326223"], ["updated_at", "2016-01-03 23:33:54.326223"]]  (10.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:54.339803"], ["updated_at", "2016-01-03 23:33:54.339803"]]  (7.4ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:54.349618"], ["updated_at", "2016-01-03 23:33:54.349618"]]  (7.3ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (6.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 8.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test6@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test6@example.com"]]  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:54.379084"], ["current_sign_in_at", "2016-01-03 23:33:54.379084"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:54.379742"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test"}, "commit"=>"Create Account"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["created_at", "2016-01-03 23:33:54.584376"], ["updated_at", "2016-01-03 23:33:54.584376"]]  (7.5ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 1], ["created_at", "2016-01-03 23:33:54.596353"], ["updated_at", "2016-01-03 23:33:54.596353"]]  (9.5ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 SQL (0.1ms) UPDATE "mtdevise_accounts" SET "owner_id" = ?, "updated_at" = ? WHERE "mtdevise_accounts"."id" = ? [["owner_id", 1], ["updated_at", "2016-01-03 23:33:54.609089"], ["id", 2]]  (7.5ms) commit transaction Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2], ["created_at", "2016-01-03 23:33:54.618737"], ["updated_at", "2016-01-03 23:33:54.618737"]]  (7.0ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (9.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 62ms (ActiveRecord: 43.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms)  (7.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test8@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "f3szk64aKGjeBeVUv8dp"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test8@example.com"], ["encrypted_password", "$2a$04$LuAj2chov13BzaHE0FuFYeOl.l45dGqvVRgm27DuvVVVr3MLLytwS"], ["confirmed_at", "2016-01-03 23:33:54.728378"], ["authentication_token", "f3szk64aKGjeBeVUv8dp"], ["created_at", "2016-01-03 23:33:54.730347"], ["updated_at", "2016-01-03 23:33:54.730347"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:54.739683"], ["updated_at", "2016-01-03 23:33:54.739683"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:54.749467"], ["updated_at", "2016-01-03 23:33:54.749467"]]  (7.1ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test8@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test8@example.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:54.780777"], ["current_sign_in_at", "2016-01-03 23:33:54.780777"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:54.781399"], ["id", 1]]  (6.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-03 23:33:54 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>""}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.4ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 10ms (Views: 3.9ms | ActiveRecord: 1.0ms)  (7.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test10@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "xznuBtUmbr2GrsQyn2m-"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test10@example.com"], ["encrypted_password", "$2a$04$9U.Pnkuy3EDiPkP0wLe84OCgp5nyLmF2sF1QGw.AZy7Izk7fJ.xtW"], ["confirmed_at", "2016-01-03 23:33:54.943275"], ["authentication_token", "xznuBtUmbr2GrsQyn2m-"], ["created_at", "2016-01-03 23:33:54.945408"], ["updated_at", "2016-01-03 23:33:54.945408"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:54.956198"], ["updated_at", "2016-01-03 23:33:54.956198"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:54.966176"], ["updated_at", "2016-01-03 23:33:54.966176"]]  (5.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test11@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "sQxzeRuzzzfYsUyq4Ath"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test11@example.com"], ["encrypted_password", "$2a$04$vUyV1fpUGSo2EHoobLQNDuvhekn4XJEFm9LyrOWbVcahzIc5LYCYu"], ["confirmed_at", "2016-01-03 23:33:54.975056"], ["authentication_token", "sQxzeRuzzzfYsUyq4Ath"], ["created_at", "2016-01-03 23:33:54.976692"], ["updated_at", "2016-01-03 23:33:54.976692"]]  (7.4ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 2], ["created_at", "2016-01-03 23:33:54.987379"], ["updated_at", "2016-01-03 23:33:54.987379"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-03 23:33:54.996848"], ["updated_at", "2016-01-03 23:33:54.996848"]]  (6.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-03 23:33:55.008720"], ["updated_at", "2016-01-03 23:33:55.008720"]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-03 23:33:55.017441"], ["updated_at", "2016-01-03 23:33:55.017441"]]  (7.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test10@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test10@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:55.049230"], ["current_sign_in_at", "2016-01-03 23:33:55.049230"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:55.049876"], ["id", 1]]  (6.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 6.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by ThingsController#index as HTML Thing Load (0.2ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 1]] Rendered things/index.html.erb within layouts/application (1.0ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.2ms)  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.2ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (10.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test13@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "KY2hVPDEXt-KDymQzGQE"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test13@example.com"], ["encrypted_password", "$2a$04$//SNiZNxoVcJuYjApvBqkORGQktlrgBTbiH27gmA/1DPZEC58/vDO"], ["confirmed_at", "2016-01-03 23:33:55.162641"], ["authentication_token", "KY2hVPDEXt-KDymQzGQE"], ["created_at", "2016-01-03 23:33:55.164701"], ["updated_at", "2016-01-03 23:33:55.164701"]]  (7.2ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:55.175662"], ["updated_at", "2016-01-03 23:33:55.175662"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:55.185454"], ["updated_at", "2016-01-03 23:33:55.185454"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "V8u6-iMavE7QTx9f66yP"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test14@example.com"], ["encrypted_password", "$2a$04$73Xw3PO3jwNHiEiFxNoiJO2ms.JnZjtepFEx/8lNxTRpDIwvb/mCi"], ["confirmed_at", "2016-01-03 23:33:55.195794"], ["authentication_token", "V8u6-iMavE7QTx9f66yP"], ["created_at", "2016-01-03 23:33:55.197589"], ["updated_at", "2016-01-03 23:33:55.197589"]]  (8.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 2], ["created_at", "2016-01-03 23:33:55.208844"], ["updated_at", "2016-01-03 23:33:55.208844"]]  (9.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-03 23:33:55.220994"], ["updated_at", "2016-01-03 23:33:55.220994"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-03 23:33:55.229743"], ["updated_at", "2016-01-03 23:33:55.229743"]]  (8.0ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-03 23:33:55.239132"], ["updated_at", "2016-01-03 23:33:55.239132"]]  (5.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test14@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test14@example.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:55.269294"], ["current_sign_in_at", "2016-01-03 23:33:55.269294"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:55.269869"], ["id", 2]]  (6.2ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 2]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test9"]] Processing by ThingsController#index as HTML Thing Load (0.1ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 2]] Rendered things/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (7.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'things';  (6.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.8ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test16@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "yu-W1rh846f_WYGUz2Q5"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test16@example.com"], ["encrypted_password", "$2a$04$vugqytwACZXxGyq9KqXUNeFu7uhFRrt4Ugm0wpXHwdb2wKWe5Xhi2"], ["confirmed_at", "2016-01-03 23:33:55.419314"], ["authentication_token", "yu-W1rh846f_WYGUz2Q5"], ["created_at", "2016-01-03 23:33:55.421336"], ["updated_at", "2016-01-03 23:33:55.421336"]]  (7.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:55.432596"], ["updated_at", "2016-01-03 23:33:55.432596"]]  (7.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:55.443149"], ["updated_at", "2016-01-03 23:33:55.443149"]]  (5.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test16@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test16@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.1ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test16@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.4ms | ActiveRecord: 0.0ms)  (5.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test17@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "asY7zUcSzQvmxwN95KxR"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test17@example.com"], ["encrypted_password", "$2a$04$kBgya57IwdVVDl2DnE9lGeQprk6z8Br.BHg316IPzClg0v9MkO84y"], ["confirmed_at", "2016-01-03 23:33:55.557379"], ["authentication_token", "asY7zUcSzQvmxwN95KxR"], ["created_at", "2016-01-03 23:33:55.559258"], ["updated_at", "2016-01-03 23:33:55.559258"]]  (8.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:55.571312"], ["updated_at", "2016-01-03 23:33:55.571312"]]  (5.5ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:55.579391"], ["updated_at", "2016-01-03 23:33:55.579391"]]  (6.1ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 8.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test17@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test17@example.com"]]  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:55.607999"], ["current_sign_in_at", "2016-01-03 23:33:55.607999"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:55.608527"], ["id", 1]]  (6.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.2ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.5ms | ActiveRecord: 0.2ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (10.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.0ms)  (9.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test19@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "WLE2sQPExL24UfM_FC_t"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test19@example.com"], ["encrypted_password", "$2a$04$6qvXfK9UMFiudYn2kLg/ROwdJoKp4kTafLPhN.c6fidfc8E5VsM/y"], ["confirmed_at", "2016-01-03 23:33:55.812699"], ["authentication_token", "WLE2sQPExL24UfM_FC_t"], ["created_at", "2016-01-03 23:33:55.814633"], ["updated_at", "2016-01-03 23:33:55.814633"]]  (6.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:55.824288"], ["updated_at", "2016-01-03 23:33:55.824288"]]  (7.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:55.834650"], ["updated_at", "2016-01-03 23:33:55.834650"]]  (5.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test19@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test19@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:55.863981"], ["current_sign_in_at", "2016-01-03 23:33:55.863981"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:55.864539"], ["id", 1]]  (9.4ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 9.7ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-03 23:33:55 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.2ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (10.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test21@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "h8hgTvfEHSvyWvSsdJTc"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test21@example.com"], ["encrypted_password", "$2a$04$3ptevP3/MgeG4N1a3nO/cO/GQ1qyJkKYy/ZECzmuf.u0or0wrGgGi"], ["confirmed_at", "2016-01-03 23:33:56.000425"], ["authentication_token", "h8hgTvfEHSvyWvSsdJTc"], ["created_at", "2016-01-03 23:33:56.002503"], ["updated_at", "2016-01-03 23:33:56.002503"]]  (5.9ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:56.011908"], ["updated_at", "2016-01-03 23:33:56.011908"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:56.021350"], ["updated_at", "2016-01-03 23:33:56.021350"]]  (9.2ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test21@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test13"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test21@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-03 23:33:56.060481"], ["current_sign_in_at", "2016-01-03 23:33:56.060481"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-03 23:33:56.061102"], ["id", 1]]  (7.1ms) commit transaction Redirected to http://test13.example.com/ Completed 302 Found in 14ms (ActiveRecord: 7.8ms) Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.2ms)  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test22@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "wnbkz2AsUbVVMhhT_ZPU"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test22@example.com"], ["encrypted_password", "$2a$04$WXFJsqcG2jK/tEuLPWHJ1.ClYs2.6iBHJbv1iWgaDrS.xS6VnI7.q"], ["confirmed_at", "2016-01-03 23:33:56.148608"], ["authentication_token", "wnbkz2AsUbVVMhhT_ZPU"], ["created_at", "2016-01-03 23:33:56.150533"], ["updated_at", "2016-01-03 23:33:56.150533"]]  (6.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:56.159897"], ["updated_at", "2016-01-03 23:33:56.159897"]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:56.169631"], ["updated_at", "2016-01-03 23:33:56.169631"]]  (10.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "E8VQvE2pGA2y3TLkCq6X"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test23@example.com"], ["encrypted_password", "$2a$04$d8JihPezxAAL7cv/R.grHegv7XFj6OZMkX8jpmssedC3nzGeuYoZS"], ["confirmed_at", "2016-01-03 23:33:56.182684"], ["authentication_token", "E8VQvE2pGA2y3TLkCq6X"], ["created_at", "2016-01-03 23:33:56.184144"], ["updated_at", "2016-01-03 23:33:56.184144"]]  (7.5ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 2], ["created_at", "2016-01-03 23:33:56.194856"], ["updated_at", "2016-01-03 23:33:56.194856"]]  (5.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-03 23:33:56.202852"], ["updated_at", "2016-01-03 23:33:56.202852"]]  (5.6ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test23@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test14"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test23@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test23@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 11ms (Views: 8.8ms | ActiveRecord: 0.0ms)  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "F9LZv1shxnhmsaq7cDP5"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$.4W2uafNf/LUDP8OOxpHVOJJwQczUMHSmrFe0y1qE2VXsgV.MPs3S"], ["confirmed_at", "2016-01-03 23:33:56.319182"], ["authentication_token", "F9LZv1shxnhmsaq7cDP5"], ["created_at", "2016-01-03 23:33:56.321283"], ["updated_at", "2016-01-03 23:33:56.321283"]]  (7.5ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:56.332164"], ["updated_at", "2016-01-03 23:33:56.332164"]]  (8.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:56.342629"], ["updated_at", "2016-01-03 23:33:56.342629"]]  (5.6ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test16"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test16"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test16"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test16"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test16"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test16"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test16"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test16"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (6.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 11ms (Views: 8.4ms | ActiveRecord: 0.0ms)  (5.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test25@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "kf4yQoLYzNWmnSjhnsBG"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test25@example.com"], ["encrypted_password", "$2a$04$I4mf.zfVw1PPM.z7n.67XefHBPNM9E67uPIc4VV8DrxtIIW98Gj56"], ["confirmed_at", "2016-01-03 23:33:56.460329"], ["authentication_token", "kf4yQoLYzNWmnSjhnsBG"], ["created_at", "2016-01-03 23:33:56.462242"], ["updated_at", "2016-01-03 23:33:56.462242"]]  (5.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 1], ["created_at", "2016-01-03 23:33:56.471279"], ["updated_at", "2016-01-03 23:33:56.471279"]]  (5.5ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-03 23:33:56.479285"], ["updated_at", "2016-01-03 23:33:56.479285"]]  (7.6ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test17"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test17"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test17"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test17"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-03 23:33:56 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test17"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test25@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test17"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test17"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test25@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test25@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test17"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (6.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 11ms (Views: 8.3ms | ActiveRecord: 0.0ms)  (5.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (10.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (8.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-05 20:09:31.309804"], ["updated_at", "2016-01-05 20:09:31.309804"]]  (7.5ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:31 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (7.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.6ms) Completed 200 OK in 295ms (Views: 283.1ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-05 20:09:31 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (3.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (61.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 101ms (Views: 67.4ms | ActiveRecord: 0.4ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:31 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (5.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 36ms (Views: 7.5ms | ActiveRecord: 1.0ms)  (9.1ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "6RJD_cVguFtdCSZVhx_h"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$2cnCbfc25IbJg/XT0VQRNutAwEjyGS4skwbqLWfdzUqHTTyhu6bdq"], ["confirmed_at", "2016-01-05 20:09:31.851593"], ["authentication_token", "6RJD_cVguFtdCSZVhx_h"], ["created_at", "2016-01-05 20:09:31.858625"], ["updated_at", "2016-01-05 20:09:31.858625"]]  (7.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:31.870134"], ["updated_at", "2016-01-05 20:09:31.870134"]]  (9.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:31.903251"], ["updated_at", "2016-01-05 20:09:31.903251"]]  (7.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:31 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-05 20:09:31 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 56ms (Views: 54.5ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:31 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"another name", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"anothersubdomain"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 19ms (Views: 6.9ms | ActiveRecord: 1.0ms)  (6.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (10.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.6ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"admin"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 16ms (Views: 5.7ms | ActiveRecord: 1.0ms)  (9.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "rbUaj11HiyGb9zZ8rv4x"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "1a18138af3e42fd31284953e8d9e8c0cbdadad0c41bc367ddd737193b5ac5d49"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "mtdevise@example.com"], ["encrypted_password", "$2a$04$GGL.V/Rg1ULURxpAP9C72OHHsTfm3bPYaIj54UqJvSKnsXOlloAyW"], ["authentication_token", "rbUaj11HiyGb9zZ8rv4x"], ["created_at", "2016-01-05 20:09:32.225511"], ["updated_at", "2016-01-05 20:09:32.225511"], ["confirmation_token", "ip-N73SKE7gn6x_rABu4"], ["confirmation_sent_at", "2016-01-05 20:09:32.414167"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (5.5ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 138.2ms Sent mail to mtdevise@example.com (9.7ms) Date: Tue, 05 Jan 2016 20:09:32 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: mtdevise@example.com Message-ID: <568c22fc8aeae_4d6b78f33428366@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome mtdevise@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:32.573701"], ["updated_at", "2016-01-05 20:09:32.573701"]]  (8.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:32.585582"], ["updated_at", "2016-01-05 20:09:32.585582"]]  (9.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-05 20:09:32.596468"], ["updated_at", "2016-01-05 20:09:32.596964"], ["id", 1]]  (7.8ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-05 20:09:32.620441"], ["updated_at", "2016-01-05 20:09:32.620441"]]  (7.6ms) commit transaction Mtdevise::Role Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:32.651050"], ["current_sign_in_at", "2016-01-05 20:09:32.651050"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:32.651818"], ["id", 1]]  (8.6ms) commit transaction Redirected to http://test.example.com/ Completed 302 Found in 447ms (ActiveRecord: 53.3ms) Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 7.4ms | ActiveRecord: 0.3ms)  (10.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 5.0ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>""}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 15ms (Views: 5.5ms | ActiveRecord: 0.9ms)  (6.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "7sTpW2H9W8sk_DFVxuZg"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$yzT85lY8KuM5i9B7DklE/OQqcTgb5dGpmSgcR7rxxwWdx6llLZo3S"], ["confirmed_at", "2016-01-05 20:09:32.858237"], ["authentication_token", "7sTpW2H9W8sk_DFVxuZg"], ["created_at", "2016-01-05 20:09:32.860344"], ["updated_at", "2016-01-05 20:09:32.860344"]]  (7.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (8.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (19.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 28ms (Views: 26.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:32.917693"], ["current_sign_in_at", "2016-01-05 20:09:32.917693"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:32.918390"], ["id", 1]]  (7.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 23ms (ActiveRecord: 8.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (3.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 6.5ms | ActiveRecord: 0.2ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_if_coming_form_sign_up rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:32 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms)  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 11.0ms | ActiveRecord: 0.0ms)  (7.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test2@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "mWEaFNJAxmYiT3GymQzD"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test2@example.com"], ["encrypted_password", "$2a$04$qch4LwupZFYj/gTIyZ.rQuWXAOjiOVLjnnyJ6kmK6dOPgneS4brTW"], ["confirmed_at", "2016-01-05 20:09:33.138453"], ["authentication_token", "mWEaFNJAxmYiT3GymQzD"], ["created_at", "2016-01-05 20:09:33.140889"], ["updated_at", "2016-01-05 20:09:33.140889"]]  (7.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:33.152794"], ["updated_at", "2016-01-05 20:09:33.152794"]]  (5.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:33.161337"], ["updated_at", "2016-01-05 20:09:33.161337"]]  (9.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test2@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test2@example.com"]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:33.197663"], ["current_sign_in_at", "2016-01-05 20:09:33.197663"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:33.198384"], ["id", 1]]  (5.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 28ms (ActiveRecord: 6.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms)  (7.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (9.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test4@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "4TWBhuG8H8Yb86r1x6NY"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test4@example.com"], ["encrypted_password", "$2a$04$LmW.90J64VFa159jxElQEe/1N1luYrsexrFXLLAjhXkPHvYL0H.C."], ["confirmed_at", "2016-01-05 20:09:33.354437"], ["authentication_token", "4TWBhuG8H8Yb86r1x6NY"], ["created_at", "2016-01-05 20:09:33.356695"], ["updated_at", "2016-01-05 20:09:33.356695"]]  (7.6ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.3ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:33.369321"], ["updated_at", "2016-01-05 20:09:33.369321"]]  (8.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:33.380642"], ["updated_at", "2016-01-05 20:09:33.380642"]]  (7.2ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.5ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test4@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test3"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test4@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:33.421895"], ["current_sign_in_at", "2016-01-05 20:09:33.421895"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:33.422606"], ["id", 1]]  (7.8ms) commit transaction Redirected to http://test3.example.com/ Completed 302 Found in 15ms (ActiveRecord: 8.4ms) Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.2ms)  (7.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test5@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "acAJxF2yanrCznHZd1Zx"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test5@example.com"], ["encrypted_password", "$2a$04$sUNZIfKF.FWWQuPYMfAArOOCEtDjS0nrw/pxxhbbaL5LLMimndxGy"], ["confirmed_at", "2016-01-05 20:09:33.521458"], ["authentication_token", "acAJxF2yanrCznHZd1Zx"], ["created_at", "2016-01-05 20:09:33.523879"], ["updated_at", "2016-01-05 20:09:33.523879"]]  (6.3ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:33.534392"], ["updated_at", "2016-01-05 20:09:33.534392"]]  (7.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:33.544983"], ["updated_at", "2016-01-05 20:09:33.544983"]]  (7.3ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.5ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test5@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test4"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test5@example.com"]] Completed 401 Unauthorized in 4ms (ActiveRecord: 0.3ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test5@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 14ms (Views: 10.8ms | ActiveRecord: 0.0ms)  (7.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.2ms) DELETE FROM sqlite_sequence where name = 'things';  (9.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test6@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "ZUUu9GsZWszxeWRXzM28"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test6@example.com"], ["encrypted_password", "$2a$04$PATcqZ3ATAH6nsS25Oz74e0I45kRRt0ioT2FkLq241hOgDr9tTHq2"], ["confirmed_at", "2016-01-05 20:09:33.682959"], ["authentication_token", "ZUUu9GsZWszxeWRXzM28"], ["created_at", "2016-01-05 20:09:33.685424"], ["updated_at", "2016-01-05 20:09:33.685424"]]  (7.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:33.696944"], ["updated_at", "2016-01-05 20:09:33.696944"]]  (7.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:33.706794"], ["updated_at", "2016-01-05 20:09:33.706794"]]  (6.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.5ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.5ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 11.1ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test5"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 6ms (ActiveRecord: 0.3ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (9.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 14ms (Views: 11.7ms | ActiveRecord: 0.0ms)  (10.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test7@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "pG9xs97ZSyj1Twv6CBFJ"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test7@example.com"], ["encrypted_password", "$2a$04$1CG78oJ6/sv5.PrjVI4OKOUc4iyt5mkbcQscwcS/ddyfEEsRaxEbK"], ["confirmed_at", "2016-01-05 20:09:33.846826"], ["authentication_token", "pG9xs97ZSyj1Twv6CBFJ"], ["created_at", "2016-01-05 20:09:33.849125"], ["updated_at", "2016-01-05 20:09:33.849125"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:33.860013"], ["updated_at", "2016-01-05 20:09:33.860013"]]  (5.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:33.868643"], ["updated_at", "2016-01-05 20:09:33.868643"]]  (7.3ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test8@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "yVy3CdFaYKFiSFfXi-Zs"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test8@example.com"], ["encrypted_password", "$2a$04$s27zAFIVC2PspvlNMmlUm.O207C30JYz04pvIYWRcm80169AdzFCS"], ["confirmed_at", "2016-01-05 20:09:33.879082"], ["authentication_token", "yVy3CdFaYKFiSFfXi-Zs"], ["created_at", "2016-01-05 20:09:33.880986"], ["updated_at", "2016-01-05 20:09:33.880986"]]  (7.6ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 2], ["created_at", "2016-01-05 20:09:33.892464"], ["updated_at", "2016-01-05 20:09:33.892464"]]  (5.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-05 20:09:33.900655"], ["updated_at", "2016-01-05 20:09:33.900655"]]  (5.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.4ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test8@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test6"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test8@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.3ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test8@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (9.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test9@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "jtzsxWvrLjxcngCqQxKR"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test9@example.com"], ["encrypted_password", "$2a$04$4idNUoCryqpa2eB2yQe/CuAWb/bauMCu4Fn05M7Ld.TI56u0I/uxG"], ["confirmed_at", "2016-01-05 20:09:34.073785"], ["authentication_token", "jtzsxWvrLjxcngCqQxKR"], ["created_at", "2016-01-05 20:09:34.076186"], ["updated_at", "2016-01-05 20:09:34.076186"]]  (6.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:34.086507"], ["updated_at", "2016-01-05 20:09:34.086507"]]  (7.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:34.097025"], ["updated_at", "2016-01-05 20:09:34.097025"]]  (7.3ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test9@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:34.131291"], ["current_sign_in_at", "2016-01-05 20:09:34.131291"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:34.132112"], ["id", 1]]  (7.3ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 7.8ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test8"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 4.6ms | ActiveRecord: 0.8ms)  (9.4ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test11@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "TWbF7fYQg69fL8qZP-pX"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test11@example.com"], ["encrypted_password", "$2a$04$kFvG1czktwO6hGnECooqR.lJVlqT2nWSipKFCrGFLQz.WuJcmRRgG"], ["confirmed_at", "2016-01-05 20:09:34.259289"], ["authentication_token", "TWbF7fYQg69fL8qZP-pX"], ["created_at", "2016-01-05 20:09:34.261765"], ["updated_at", "2016-01-05 20:09:34.261765"]]  (7.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:34.273380"], ["updated_at", "2016-01-05 20:09:34.273380"]]  (7.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:34.283323"], ["updated_at", "2016-01-05 20:09:34.283323"]]  (9.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test11@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test11@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:34.318655"], ["current_sign_in_at", "2016-01-05 20:09:34.318655"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:34.319369"], ["id", 1]]  (5.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 6.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.3ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"admin"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 4.4ms | ActiveRecord: 0.8ms)  (7.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (10.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test13@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "tce4m6Jyrr_ryz_3xhMt"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test13@example.com"], ["encrypted_password", "$2a$04$svR/t6zpT/QO0.HO/M9ZVuCw5fnXeTAHpL0BU1tLorA.jpSAqkCTW"], ["confirmed_at", "2016-01-05 20:09:34.438408"], ["authentication_token", "tce4m6Jyrr_ryz_3xhMt"], ["created_at", "2016-01-05 20:09:34.440627"], ["updated_at", "2016-01-05 20:09:34.440627"]]  (7.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:34.451793"], ["updated_at", "2016-01-05 20:09:34.451793"]]  (6.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:34.460656"], ["updated_at", "2016-01-05 20:09:34.460656"]]  (7.9ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.5ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test13@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test13@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:34.494304"], ["current_sign_in_at", "2016-01-05 20:09:34.494304"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:34.494952"], ["id", 1]]  (7.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 8.2ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["created_at", "2016-01-05 20:09:34.533211"], ["updated_at", "2016-01-05 20:09:34.533211"]]  (9.9ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 1], ["created_at", "2016-01-05 20:09:34.547659"], ["updated_at", "2016-01-05 20:09:34.547659"]]  (5.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 SQL (0.1ms) UPDATE "mtdevise_accounts" SET "owner_id" = ?, "updated_at" = ? WHERE "mtdevise_accounts"."id" = ? [["owner_id", 1], ["updated_at", "2016-01-05 20:09:34.557263"], ["id", 2]]  (7.2ms) commit transaction Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2], ["created_at", "2016-01-05 20:09:34.566673"], ["updated_at", "2016-01-05 20:09:34.566673"]]  (7.7ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 60ms (ActiveRecord: 41.0ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.2ms)  (6.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test15@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "C8bwUcFTjRutRKW35-gE"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test15@example.com"], ["encrypted_password", "$2a$04$kizKm97giG7/3j7AIInrEOOaPV63.z4UXfOy5wiLMDHCLPpTL80fq"], ["confirmed_at", "2016-01-05 20:09:34.678500"], ["authentication_token", "C8bwUcFTjRutRKW35-gE"], ["created_at", "2016-01-05 20:09:34.680697"], ["updated_at", "2016-01-05 20:09:34.680697"]]  (7.6ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:34.692298"], ["updated_at", "2016-01-05 20:09:34.692298"]]  (8.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:34.703373"], ["updated_at", "2016-01-05 20:09:34.703373"]]  (7.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test15@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test15@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:34.736423"], ["current_sign_in_at", "2016-01-05 20:09:34.736423"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:34.737246"], ["id", 1]]  (10.3ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 18ms (ActiveRecord: 10.7ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>""}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 4.8ms | ActiveRecord: 0.9ms)  (6.9ms) DELETE FROM "things";  (0.4ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (10.2ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (15.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (7.5ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (1.0ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:34 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)  (8.1ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 5.0ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms)  (7.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "5Fk9W9vBeyVQUvK1911s"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$ZUmbk84uLOActX9vqbS/.ez/DkO.Nn8XzOMyFt120LxnoqSEYQiEO"], ["confirmed_at", "2016-01-05 20:09:35.126656"], ["authentication_token", "5Fk9W9vBeyVQUvK1911s"], ["created_at", "2016-01-05 20:09:35.129002"], ["updated_at", "2016-01-05 20:09:35.129002"]]  (7.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:35.161510"], ["current_sign_in_at", "2016-01-05 20:09:35.161510"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:35.162130"], ["id", 1]]  (7.4ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.7ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms) Started GET "/" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Mtdevise::WelcomeController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_logged_in_users_to_account_page rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.7ms | ActiveRecord: 0.2ms)  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test17@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "n8496dJd19rrMxdwa85u"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test17@example.com"], ["encrypted_password", "$2a$04$tClJdaKyWZmURuAk7fRE8.SmNKp2HoM5xBuHbdBQ1JZ6iGZ5IevIu"], ["confirmed_at", "2016-01-05 20:09:35.302100"], ["authentication_token", "n8496dJd19rrMxdwa85u"], ["created_at", "2016-01-05 20:09:35.304279"], ["updated_at", "2016-01-05 20:09:35.304279"]]  (6.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:35.314716"], ["updated_at", "2016-01-05 20:09:35.314716"]]  (7.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:35.325162"], ["updated_at", "2016-01-05 20:09:35.325162"]]  (7.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test17@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test17@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:35.357731"], ["current_sign_in_at", "2016-01-05 20:09:35.357731"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:35.358422"], ["id", 1]]  (9.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 17ms (ActiveRecord: 10.0ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test19@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "ANAsxwxiq2AhXpJzgDWv"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test19@example.com"], ["encrypted_password", "$2a$04$Rt.v2qtyWpkboesCMrbpbup68r/v2U.habbIkzOWZdi5X/XINPJO2"], ["confirmed_at", "2016-01-05 20:09:35.454081"], ["authentication_token", "ANAsxwxiq2AhXpJzgDWv"], ["created_at", "2016-01-05 20:09:35.456521"], ["updated_at", "2016-01-05 20:09:35.456521"]]  (10.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:35.470672"], ["updated_at", "2016-01-05 20:09:35.470672"]]  (8.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:35.481715"], ["updated_at", "2016-01-05 20:09:35.481715"]]  (7.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test19@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test19@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.1ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test19@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.5ms | ActiveRecord: 0.0ms)  (8.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (10.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "mmV7Kj8yx74wJPk92Pfv"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "a0ce05c85c4009b16365517d19ca372124bdd36a9c049c43b8ae709a6127ea82"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$cG.23u/ETSkcb.bou.tGD.3ZdJOaoEitgckfJhrBKjWvpL3OeCQ/i"], ["authentication_token", "mmV7Kj8yx74wJPk92Pfv"], ["created_at", "2016-01-05 20:09:35.753377"], ["updated_at", "2016-01-05 20:09:35.753377"], ["confirmation_token", "Tn1b-QNKFv3CczwJsQkY"], ["confirmation_sent_at", "2016-01-05 20:09:35.754075"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.7ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 5.1ms Sent mail to user@example.com (2.7ms) Date: Tue, 05 Jan 2016 20:09:35 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <568c22ffba066_4d6b78f334284b9@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:35.763642"], ["updated_at", "2016-01-05 20:09:35.763642"]]  (6.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:35.773088"], ["updated_at", "2016-01-05 20:09:35.773088"]]  (8.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-05 20:09:35.782366"], ["updated_at", "2016-01-05 20:09:35.782779"], ["id", 1]]  (7.0ms) commit transaction Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test20@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "CD9rJ-ML2Vg6zVRxKv6i"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test20@example.com"], ["encrypted_password", "$2a$04$OY7OtOagIq/3XudrT.SdyOexdi.zIzSzxQSvPPCYRjI9rd7SwTUVi"], ["confirmed_at", "2016-01-05 20:09:35.910020"], ["authentication_token", "CD9rJ-ML2Vg6zVRxKv6i"], ["created_at", "2016-01-05 20:09:35.912314"], ["updated_at", "2016-01-05 20:09:35.912314"]]  (6.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:35.922359"], ["updated_at", "2016-01-05 20:09:35.922359"]]  (9.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:35.934581"], ["updated_at", "2016-01-05 20:09:35.934581"]]  (7.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test21@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "cYca9frzw8TEi-p_zVRR"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test21@example.com"], ["encrypted_password", "$2a$04$YEB3aMLJsCirLpTuNS9VTufV0j7BK3gffzJYBGfIZDMUNksEiKt8i"], ["confirmed_at", "2016-01-05 20:09:35.945423"], ["authentication_token", "cYca9frzw8TEi-p_zVRR"], ["created_at", "2016-01-05 20:09:35.947342"], ["updated_at", "2016-01-05 20:09:35.947342"]]  (7.6ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 2], ["created_at", "2016-01-05 20:09:35.958723"], ["updated_at", "2016-01-05 20:09:35.958723"]]  (7.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-05 20:09:35.968625"], ["updated_at", "2016-01-05 20:09:35.968625"]]  (6.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-05 20:09:35.980599"], ["updated_at", "2016-01-05 20:09:35.980599"]]  (5.9ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-05 20:09:35.988116"], ["updated_at", "2016-01-05 20:09:35.988116"]]  (5.9ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:35 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:36 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test20@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test20@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:36.019672"], ["current_sign_in_at", "2016-01-05 20:09:36.019672"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:36.020396"], ["id", 1]]  (9.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 18ms (ActiveRecord: 10.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:36 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-05 20:09:36 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by ThingsController#index as HTML Thing Load (0.2ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 1]] Rendered things/index.html.erb within layouts/application (1.0ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.2ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'things';  (7.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "S_g1_Xotn1WzzTuPxtVt"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test23@example.com"], ["encrypted_password", "$2a$04$kK/pGWKm3aKUzbEAHES4GuHhVAYQ3uiWE7sg4OHqqmbsZn3TReKrK"], ["confirmed_at", "2016-01-05 20:09:36.139982"], ["authentication_token", "S_g1_Xotn1WzzTuPxtVt"], ["created_at", "2016-01-05 20:09:36.142414"], ["updated_at", "2016-01-05 20:09:36.142414"]]  (7.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:36.154347"], ["updated_at", "2016-01-05 20:09:36.154347"]]  (7.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:36.164957"], ["updated_at", "2016-01-05 20:09:36.164957"]]  (7.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "YohDGxzQyK7-zqeDZghu"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$g4E2f9uR0HOtVzRDiv.cLODRutDQzW0Bn/j8ZB5UHceiETjNG4YAW"], ["confirmed_at", "2016-01-05 20:09:36.175772"], ["authentication_token", "YohDGxzQyK7-zqeDZghu"], ["created_at", "2016-01-05 20:09:36.177983"], ["updated_at", "2016-01-05 20:09:36.177983"]]  (9.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 2], ["created_at", "2016-01-05 20:09:36.191696"], ["updated_at", "2016-01-05 20:09:36.191696"]]  (6.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-05 20:09:36.200747"], ["updated_at", "2016-01-05 20:09:36.200747"]]  (6.1ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-05 20:09:36.208501"], ["updated_at", "2016-01-05 20:09:36.208501"]]  (5.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-05 20:09:36.215578"], ["updated_at", "2016-01-05 20:09:36.215578"]]  (7.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:36 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-05 20:09:36 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test24@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test24@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:36.248742"], ["current_sign_in_at", "2016-01-05 20:09:36.248742"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:36.249483"], ["id", 2]]  (7.4ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.8ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-05 20:09:36 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 2]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-05 20:09:36 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test17"]] Processing by ThingsController#index as HTML Thing Load (0.1ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 2]] Rendered things/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (6.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.5ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "vyAuf4fCkAFdsuUtpUFx"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "ca660562964544d4e47d330e1b4e1147e96e2d4d92f6298b092e0be4b2f5e606"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$vrhcwCIAC24KiD5eSPdch.owGfPfPpujk4jQnrZkAhZ5yCQd9NVzC"], ["authentication_token", "vyAuf4fCkAFdsuUtpUFx"], ["created_at", "2016-01-05 20:09:36.418206"], ["updated_at", "2016-01-05 20:09:36.418206"], ["confirmation_token", "fQrERFi-f8Ryq9jeaDm3"], ["confirmation_sent_at", "2016-01-05 20:09:36.418993"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.0ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.4ms Sent mail to bb@gmail.com (2.7ms) Date: Tue, 05 Jan 2016 20:09:36 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <568c230068129_4d6b78f334285f2@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:36.427942"], ["updated_at", "2016-01-05 20:09:36.427942"]]  (6.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:36.437164"], ["updated_at", "2016-01-05 20:09:36.437164"]]  (7.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-05 20:09:36.446067"], ["updated_at", "2016-01-05 20:09:36.446520"], ["id", 1]]  (6.8ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-05 20:09:36.458043"], ["updated_at", "2016-01-05 20:09:36.458043"]]  (7.4ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:36.478135"], ["current_sign_in_at", "2016-01-05 20:09:36.478135"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:36.478682"], ["id", 1]]  (7.2ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 80ms (ActiveRecord: 45.4ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "r4mn9ZVpjx3idbaRoc5M"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "c24d864cec23dc720d9b9cd917145e67b7c8b6d709a3cb867fa27186a7c84247"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$nYAsyaKH624ZCRsaxjdfb.g3kwt0EbFcJPfH23MG746C7EbEmoEdq"], ["authentication_token", "r4mn9ZVpjx3idbaRoc5M"], ["created_at", "2016-01-05 20:09:36.582214"], ["updated_at", "2016-01-05 20:09:36.582214"], ["confirmation_token", "J1iLeoRUKSGgS4jcgy9z"], ["confirmation_sent_at", "2016-01-05 20:09:36.583030"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (2.8ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.0ms Sent mail to bb@gmail.com (2.5ms) Date: Tue, 05 Jan 2016 20:09:36 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <568c23008ffd1_4d6b78f334286f3@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-05 20:09:36.591396"], ["updated_at", "2016-01-05 20:09:36.591396"]]  (13.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-05 20:09:36.607360"], ["updated_at", "2016-01-05 20:09:36.607360"]]  (10.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-05 20:09:36.618437"], ["updated_at", "2016-01-05 20:09:36.618889"], ["id", 1]]  (7.6ms) commit transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-05 20:09:36.631225"], ["updated_at", "2016-01-05 20:09:36.631225"]]  (14.3ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (6.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-05 20:09:36.658165"], ["current_sign_in_at", "2016-01-05 20:09:36.658165"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-05 20:09:36.658704"], ["id", 1]]  (7.6ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 95ms (ActiveRecord: 62.1ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (5.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (10.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_accounts_on_subdomain' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_accounts_on_subdomain' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_roles_on_name_and_resource_type_and_resourc' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_roles_on_name_and_resource_type_and_resourc' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_roles_on_name' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_roles_on_name' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_authentication_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_authentication_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_reset_password_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_reset_password_token' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_on_email' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_on_email' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_mtdevise_users_mtdevise_roles_on_user_id_and_role_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_mtdevise_users_mtdevise_roles_on_user_id_and_role_id' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (9.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "w6rgzzyVLxiGCZzLoiCz"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$VYun/ZLS8KWdQcJ/WANwFegujNyMAlnff3rOBW28pur/lH01azr5K"], ["confirmed_at", "2016-01-08 03:42:39.138361"], ["authentication_token", "w6rgzzyVLxiGCZzLoiCz"], ["created_at", "2016-01-08 03:42:39.158743"], ["updated_at", "2016-01-08 03:42:39.158743"]]  (7.5ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:39.180293"], ["updated_at", "2016-01-08 03:42:39.180293"]]  (5.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:39.210919"], ["updated_at", "2016-01-08 03:42:39.210919"]]  (7.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test2@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "FMUoox5_M8X7dZWG6y2j"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test2@example.com"], ["encrypted_password", "$2a$04$skMkAUJbbft5g0kciwPX.eizsZ6BUhzapfOtqfSQZfLXdeRFpyIrK"], ["confirmed_at", "2016-01-08 03:42:39.221529"], ["authentication_token", "FMUoox5_M8X7dZWG6y2j"], ["created_at", "2016-01-08 03:42:39.223505"], ["updated_at", "2016-01-08 03:42:39.223505"]]  (9.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 2], ["created_at", "2016-01-08 03:42:39.236670"], ["updated_at", "2016-01-08 03:42:39.236670"]]  (5.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-08 03:42:39.245066"], ["updated_at", "2016-01-08 03:42:39.245066"]]  (5.4ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:39 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test1"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test1"]] Completed 401 Unauthorized in 15ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:39 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test1"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test1"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (9.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (66.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.5ms) Completed 200 OK in 407ms (Views: 404.5ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:39 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test1"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test2@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test1"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test1"]] Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test2@example.com"]] Completed 401 Unauthorized in 5ms (ActiveRecord: 0.6ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test2@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test1"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 14ms (Views: 10.6ms | ActiveRecord: 0.0ms)  (9.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test3@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "mbG3xXV_-95SJ_S_y_By"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test3@example.com"], ["encrypted_password", "$2a$04$M5mmznmessnNQdJlCbmyFeT5Yg6t2kR9PmaY6X85GPMyXwky3XAfO"], ["confirmed_at", "2016-01-08 03:42:39.823686"], ["authentication_token", "mbG3xXV_-95SJ_S_y_By"], ["created_at", "2016-01-08 03:42:39.825882"], ["updated_at", "2016-01-08 03:42:39.825882"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:39.836775"], ["updated_at", "2016-01-08 03:42:39.836775"]]  (5.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:39.845370"], ["updated_at", "2016-01-08 03:42:39.845370"]]  (8.4ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:39 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:39 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.5ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:39 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test3@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test3"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test3@example.com"]] Completed 401 Unauthorized in 4ms (ActiveRecord: 0.3ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test3@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 0.0ms)  (9.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test4@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "-__i3RD-dEzCY_RrMwXf"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test4@example.com"], ["encrypted_password", "$2a$04$1sBUs/LZFW.Ie7J7vGNSBeqxY0NZKkQFxU1muFKe/wlejrdeM/ZMm"], ["confirmed_at", "2016-01-08 03:42:39.975394"], ["authentication_token", "-__i3RD-dEzCY_RrMwXf"], ["created_at", "2016-01-08 03:42:39.977855"], ["updated_at", "2016-01-08 03:42:39.977855"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:39.989172"], ["updated_at", "2016-01-08 03:42:39.989172"]]  (5.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:39.997548"], ["updated_at", "2016-01-08 03:42:39.997548"]]  (7.4ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test4@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test4"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test4@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:40.038227"], ["current_sign_in_at", "2016-01-08 03:42:40.038227"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:40.038973"], ["id", 1]]  (7.3ms) commit transaction Redirected to http://test4.example.com/ Completed 302 Found in 20ms (ActiveRecord: 7.9ms) Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 7.5ms | ActiveRecord: 0.3ms)  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test5@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "8zJhJXk3wKaW2YsW-Zdp"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test5@example.com"], ["encrypted_password", "$2a$04$FuIOXpJDMasrc8JxZqAozuNnaAa/iZlFiDurSP61b9K8q7XYC/qPa"], ["confirmed_at", "2016-01-08 03:42:40.141376"], ["authentication_token", "8zJhJXk3wKaW2YsW-Zdp"], ["created_at", "2016-01-08 03:42:40.143637"], ["updated_at", "2016-01-08 03:42:40.143637"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:40.154385"], ["updated_at", "2016-01-08 03:42:40.154385"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:40.164197"], ["updated_at", "2016-01-08 03:42:40.164197"]]  (7.3ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.6ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test5"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.4ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.9ms | ActiveRecord: 0.0ms)  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.0ms)  (6.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test6@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "yPZDpdNyGzWU6XeshgyQ"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test6@example.com"], ["encrypted_password", "$2a$04$v1ZRXgyGc7xJwM2OOAq4CuLILFkSu37XcG9xP.lnXJKwTXccXWCye"], ["confirmed_at", "2016-01-08 03:42:40.414957"], ["authentication_token", "yPZDpdNyGzWU6XeshgyQ"], ["created_at", "2016-01-08 03:42:40.417294"], ["updated_at", "2016-01-08 03:42:40.417294"]]  (8.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:40.429380"], ["updated_at", "2016-01-08 03:42:40.429380"]]  (5.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:40.437747"], ["updated_at", "2016-01-08 03:42:40.437747"]]  (7.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test6@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test6@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:40.471392"], ["current_sign_in_at", "2016-01-08 03:42:40.471392"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:40.472013"], ["id", 1]]  (6.5ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 6.9ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 9.8ms | ActiveRecord: 0.3ms)  (7.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (10.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test8@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "DRcVzCYZT7caj_YSvCiZ"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test8@example.com"], ["encrypted_password", "$2a$04$XKHTnmAXyAEsERGZ4Wx.2.gAGyW2YR//UzOmgl2TuAYLQFQ/PzzoW"], ["confirmed_at", "2016-01-08 03:42:40.619320"], ["authentication_token", "DRcVzCYZT7caj_YSvCiZ"], ["created_at", "2016-01-08 03:42:40.621483"], ["updated_at", "2016-01-08 03:42:40.621483"]]  (8.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:40.633927"], ["updated_at", "2016-01-08 03:42:40.633927"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:40.643711"], ["updated_at", "2016-01-08 03:42:40.643711"]]  (6.9ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test8@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test8@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.1ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test8@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 11.0ms | ActiveRecord: 0.0ms)  (7.1ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test9@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "wqBVTgSm5q2yHesSEENx"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test9@example.com"], ["encrypted_password", "$2a$04$1zjLgx9p5ZhEC.FAenlNYu7hEPWZKggJoHApDGsMl.taJCKjrGkO."], ["confirmed_at", "2016-01-08 03:42:40.765429"], ["authentication_token", "wqBVTgSm5q2yHesSEENx"], ["created_at", "2016-01-08 03:42:40.767683"], ["updated_at", "2016-01-08 03:42:40.767683"]]  (9.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:40.780899"], ["updated_at", "2016-01-08 03:42:40.780899"]]  (6.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:40.789878"], ["updated_at", "2016-01-08 03:42:40.789878"]]  (7.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test9@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:40.823952"], ["current_sign_in_at", "2016-01-08 03:42:40.823952"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:40.824572"], ["id", 1]]  (9.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 17ms (ActiveRecord: 10.2ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:40 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms)  (6.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (10.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (9.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (9.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (1.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (6.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.4ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"admin"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 16ms (Views: 5.7ms | ActiveRecord: 0.9ms)  (7.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (10.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test11@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "S2rTxq-RroEAQoAkSzHf"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test11@example.com"], ["encrypted_password", "$2a$04$eIQPLPVbjnikLr2.snfph.cwEes54c5o0opS1VT5npYH8WusQ9COK"], ["confirmed_at", "2016-01-08 03:42:41.189324"], ["authentication_token", "S2rTxq-RroEAQoAkSzHf"], ["created_at", "2016-01-08 03:42:41.191422"], ["updated_at", "2016-01-08 03:42:41.191422"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:41.202319"], ["updated_at", "2016-01-08 03:42:41.202319"]]  (7.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:41.212734"], ["updated_at", "2016-01-08 03:42:41.212734"]]  (5.9ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"another name", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"test11@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"anothersubdomain"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.3ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test11@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test11@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 16ms (Views: 6.0ms | ActiveRecord: 1.0ms)  (6.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>""}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 14ms (Views: 5.2ms | ActiveRecord: 0.8ms)  (7.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "iamXiuvTsvHNuyeToC6k"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "8b60a495cdc1116f52f08ea61e03dc580c590da03d1c1fa3937f6989c134b0b6"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "mtdevise@example.com"], ["encrypted_password", "$2a$04$Q2OmDmjc0t.Wb23xxALRSuswvCBrKh.rlYAwf6rQofmMUCFq16FpC"], ["authentication_token", "iamXiuvTsvHNuyeToC6k"], ["created_at", "2016-01-08 03:42:41.507726"], ["updated_at", "2016-01-08 03:42:41.507726"], ["confirmation_token", "tWSxs1oSnTtxx8GwsL7U"], ["confirmation_sent_at", "2016-01-08 03:42:41.684913"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (4.7ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 134.3ms Sent mail to mtdevise@example.com (8.8ms) Date: Fri, 08 Jan 2016 03:42:41 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: mtdevise@example.com Message-ID: <568f3031cbc76_4b586f330527d0@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome mtdevise@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:41.838612"], ["updated_at", "2016-01-08 03:42:41.838612"]]  (9.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:41.851372"], ["updated_at", "2016-01-08 03:42:41.851372"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-08 03:42:41.859818"], ["updated_at", "2016-01-08 03:42:41.860299"], ["id", 1]]  (5.3ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-08 03:42:41.881538"], ["updated_at", "2016-01-08 03:42:41.881538"]]  (7.3ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:41.910080"], ["current_sign_in_at", "2016-01-08 03:42:41.910080"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:41.910755"], ["id", 1]]  (6.6ms) commit transaction Redirected to http://test.example.com/ Completed 302 Found in 420ms (ActiveRecord: 47.6ms) Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:41 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.0ms | ActiveRecord: 0.2ms)  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-08 03:42:42.002175"], ["updated_at", "2016-01-08 03:42:42.002175"]]  (6.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 18ms (Views: 7.2ms | ActiveRecord: 0.9ms)  (5.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "uA96no8sEcgaoKsveRUz"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$JLclb9fYjDPNwkoTXYdVj.5E3NW9Of1urtP0aJAcX2B5M6XRIdZQq"], ["confirmed_at", "2016-01-08 03:42:42.115052"], ["authentication_token", "uA96no8sEcgaoKsveRUz"], ["created_at", "2016-01-08 03:42:42.117176"], ["updated_at", "2016-01-08 03:42:42.117176"]]  (7.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:42.149507"], ["current_sign_in_at", "2016-01-08 03:42:42.149507"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:42.150127"], ["id", 1]]  (7.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.9ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_if_coming_form_sign_up rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms)  (6.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.0ms)  (5.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms)  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "1GxASQwJx7DKHCxmkt-J"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$tKaHOHS5IablCdvy26Tia.6Jo8gtyuBnaFtHWxkETmDrB7Qit.uoG"], ["confirmed_at", "2016-01-08 03:42:42.482245"], ["authentication_token", "1GxASQwJx7DKHCxmkt-J"], ["created_at", "2016-01-08 03:42:42.484426"], ["updated_at", "2016-01-08 03:42:42.484426"]]  (6.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:42.514053"], ["current_sign_in_at", "2016-01-08 03:42:42.514053"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:42.514662"], ["id", 1]]  (7.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.9ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms) Started GET "/" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_logged_in_users_to_account_page rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms)  (7.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "J_NywcdfNcrB4PnVcssH"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "26ba8f44aad369d115681a1653c2d3d83b64bbf270211a5985d158712c2c77e8"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$T7YWFx08od1ozFyYLmRiVONH720LXJ1pFNQ9zud6FjSaPf2APCbjW"], ["authentication_token", "J_NywcdfNcrB4PnVcssH"], ["created_at", "2016-01-08 03:42:42.658546"], ["updated_at", "2016-01-08 03:42:42.658546"], ["confirmation_token", "sATvpyQtRdTs7_ekctge"], ["confirmation_sent_at", "2016-01-08 03:42:42.659258"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.1ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.3ms Sent mail to user@example.com (2.7ms) Date: Fri, 08 Jan 2016 03:42:42 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <568f3032a2a96_4b586f330528c5@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:42.667935"], ["updated_at", "2016-01-08 03:42:42.667935"]]  (8.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:42.679055"], ["updated_at", "2016-01-08 03:42:42.679055"]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-08 03:42:42.687320"], ["updated_at", "2016-01-08 03:42:42.687733"], ["id", 1]]  (6.9ms) commit transaction Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (6.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test12@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "wDdSpsp4w6eP6DQfs5oh"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test12@example.com"], ["encrypted_password", "$2a$04$RhiKoeaI1SOF.fgAJJ09Gu7y.cZ7IyoVeF20nD//rGFkYcPKN09s2"], ["confirmed_at", "2016-01-08 03:42:42.816602"], ["authentication_token", "wDdSpsp4w6eP6DQfs5oh"], ["created_at", "2016-01-08 03:42:42.818666"], ["updated_at", "2016-01-08 03:42:42.818666"]]  (10.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:42.832228"], ["updated_at", "2016-01-08 03:42:42.832228"]]  (6.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:42.840894"], ["updated_at", "2016-01-08 03:42:42.840894"]]  (6.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test13@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "E9hyKNgievZgdDytEsrw"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test13@example.com"], ["encrypted_password", "$2a$04$Wy8xyzoz5p7J9gNGUGGi/ukDjY5TM3CDW0h5S1MOeU8di31gHplG."], ["confirmed_at", "2016-01-08 03:42:42.850088"], ["authentication_token", "E9hyKNgievZgdDytEsrw"], ["created_at", "2016-01-08 03:42:42.851878"], ["updated_at", "2016-01-08 03:42:42.851878"]]  (7.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 2], ["created_at", "2016-01-08 03:42:42.863296"], ["updated_at", "2016-01-08 03:42:42.863296"]]  (8.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-08 03:42:42.873876"], ["updated_at", "2016-01-08 03:42:42.873876"]]  (7.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-08 03:42:42.887386"], ["updated_at", "2016-01-08 03:42:42.887386"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-08 03:42:42.895859"], ["updated_at", "2016-01-08 03:42:42.895859"]]  (7.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test12@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test12@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:42.927272"], ["current_sign_in_at", "2016-01-08 03:42:42.927272"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:42.927958"], ["id", 1]]  (6.1ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 6.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-08 03:42:42 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by ThingsController#index as HTML Thing Load (0.2ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 1]] Rendered things/index.html.erb within layouts/application (0.9ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.2ms)  (9.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test15@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "ymLtHBTbR-ycWymdUtUM"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test15@example.com"], ["encrypted_password", "$2a$04$GiNrw2bXWNBWfr2wdXGrCe6Q98XXxTEZYpEecYGjwfaZiHmQRodaq"], ["confirmed_at", "2016-01-08 03:42:43.042908"], ["authentication_token", "ymLtHBTbR-ycWymdUtUM"], ["created_at", "2016-01-08 03:42:43.044957"], ["updated_at", "2016-01-08 03:42:43.044957"]]  (6.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:43.055016"], ["updated_at", "2016-01-08 03:42:43.055016"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:43.065074"], ["updated_at", "2016-01-08 03:42:43.065074"]]  (8.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test16@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "2oz9hPvZTqj5AbGpzTHt"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test16@example.com"], ["encrypted_password", "$2a$04$.NhdICqFRxJEAu79HIffWOIcsp/we8NQw2AobVFWzwNu3U.Xeq61e"], ["confirmed_at", "2016-01-08 03:42:43.076182"], ["authentication_token", "2oz9hPvZTqj5AbGpzTHt"], ["created_at", "2016-01-08 03:42:43.077910"], ["updated_at", "2016-01-08 03:42:43.077910"]]  (7.4ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 2], ["created_at", "2016-01-08 03:42:43.088869"], ["updated_at", "2016-01-08 03:42:43.088869"]]  (6.2ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-08 03:42:43.097625"], ["updated_at", "2016-01-08 03:42:43.097625"]]  (7.6ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-08 03:42:43.106716"], ["updated_at", "2016-01-08 03:42:43.106716"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-08 03:42:43.114798"], ["updated_at", "2016-01-08 03:42:43.114798"]]  (7.1ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test16@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test16@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:43.146950"], ["current_sign_in_at", "2016-01-08 03:42:43.146950"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:43.147566"], ["id", 2]]  (7.4ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.7ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 2]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by ThingsController#index as HTML Thing Load (0.1ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 2]] Rendered things/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.2ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "wm_Byrx5qzAgqRFbdhqV"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "5801ac3741651790593718412549270168a568ccaf075150fb5dcfddfb682499"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$vw0vYrht212EuOj5owley.xa8l2kVcioKGL2oT.AZFIkXbPEM4K7G"], ["authentication_token", "wm_Byrx5qzAgqRFbdhqV"], ["created_at", "2016-01-08 03:42:43.316091"], ["updated_at", "2016-01-08 03:42:43.316091"], ["confirmation_token", "oSt7m1WwcWKm-gxWLk9v"], ["confirmation_sent_at", "2016-01-08 03:42:43.316908"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (2.8ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.0ms Sent mail to bb@gmail.com (2.6ms) Date: Fri, 08 Jan 2016 03:42:43 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <568f30334f028_4b586f33052950@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:43.325178"], ["updated_at", "2016-01-08 03:42:43.325178"]]  (11.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:43.338720"], ["updated_at", "2016-01-08 03:42:43.338720"]]  (7.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-08 03:42:43.347187"], ["updated_at", "2016-01-08 03:42:43.347584"], ["id", 1]]  (7.1ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-08 03:42:43.359207"], ["updated_at", "2016-01-08 03:42:43.359207"]]  (7.4ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (8.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:43.380808"], ["current_sign_in_at", "2016-01-08 03:42:43.380808"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:43.381385"], ["id", 1]]  (7.2ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 84ms (ActiveRecord: 51.5ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "maaEi27NCR612i78br-y"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "bda1b8566a99a99969008f05c72e536f6df333056f7f54fe7eae87d879b29d56"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$TfNvqXQ9rm1aaSQUVB8Bhu9WlHAcIJwOW5MmOrmJPTqrzi72ydMHi"], ["authentication_token", "maaEi27NCR612i78br-y"], ["created_at", "2016-01-08 03:42:43.483254"], ["updated_at", "2016-01-08 03:42:43.483254"], ["confirmation_token", "sy-N1zHxB22Dw2v1BRe7"], ["confirmation_sent_at", "2016-01-08 03:42:43.484098"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.0ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.3ms Sent mail to bb@gmail.com (2.6ms) Date: Fri, 08 Jan 2016 03:42:43 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <568f303377ec5_4b586f330530f9@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:43.492736"], ["updated_at", "2016-01-08 03:42:43.492736"]]  (6.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:43.502509"], ["updated_at", "2016-01-08 03:42:43.502509"]]  (7.5ms) commit transaction  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-08 03:42:43.511151"], ["updated_at", "2016-01-08 03:42:43.511537"], ["id", 1]]  (7.4ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-08 03:42:43.523467"], ["updated_at", "2016-01-08 03:42:43.523467"]]  (7.7ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (10.2ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:43.546528"], ["current_sign_in_at", "2016-01-08 03:42:43.546528"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:43.547007"], ["id", 1]]  (7.2ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 83ms (ActiveRecord: 49.3ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (5.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (9.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test18@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "HzH7V48vyqAYapQoaAQz"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test18@example.com"], ["encrypted_password", "$2a$04$wMNvepPb87QtPUaV1IDaju5v6FJ/jEbAF1mdnnrLZSZgEIISAS4Nu"], ["confirmed_at", "2016-01-08 03:42:43.691031"], ["authentication_token", "HzH7V48vyqAYapQoaAQz"], ["created_at", "2016-01-08 03:42:43.693331"], ["updated_at", "2016-01-08 03:42:43.693331"]]  (7.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:43.704174"], ["updated_at", "2016-01-08 03:42:43.704174"]]  (6.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:43.713116"], ["updated_at", "2016-01-08 03:42:43.713116"]]  (6.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test18@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test18@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:43.743690"], ["current_sign_in_at", "2016-01-08 03:42:43.743690"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:43.744289"], ["id", 1]]  (8.5ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 8.8ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (15.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 19ms (Views: 17.3ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["created_at", "2016-01-08 03:42:43.796302"], ["updated_at", "2016-01-08 03:42:43.796302"]]  (6.5ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 1], ["created_at", "2016-01-08 03:42:43.807379"], ["updated_at", "2016-01-08 03:42:43.807379"]]  (7.9ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 SQL (0.2ms) UPDATE "mtdevise_accounts" SET "owner_id" = ?, "updated_at" = ? WHERE "mtdevise_accounts"."id" = ? [["owner_id", 1], ["updated_at", "2016-01-08 03:42:43.818665"], ["id", 2]]  (6.7ms) commit transaction Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2], ["created_at", "2016-01-08 03:42:43.827611"], ["updated_at", "2016-01-08 03:42:43.827611"]]  (7.5ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.1ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (10.4ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 60ms (ActiveRecord: 41.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms)  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.0ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test20@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "urxKrgEovsM_uBzsG7A_"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test20@example.com"], ["encrypted_password", "$2a$04$932/Vd9UV8OQkrK9DeddDujrYjJfq.5FP7kEJlsYQN5zYGXp3yW8e"], ["confirmed_at", "2016-01-08 03:42:43.942927"], ["authentication_token", "urxKrgEovsM_uBzsG7A_"], ["created_at", "2016-01-08 03:42:43.944940"], ["updated_at", "2016-01-08 03:42:43.944940"]]  (8.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:43.957614"], ["updated_at", "2016-01-08 03:42:43.957614"]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:43.968205"], ["updated_at", "2016-01-08 03:42:43.968205"]]  (6.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:43 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test20@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test20@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:44.004673"], ["current_sign_in_at", "2016-01-08 03:42:44.004673"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:44.005448"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 18ms (ActiveRecord: 7.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (5.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 8.8ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>""}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 4.5ms | ActiveRecord: 0.9ms)  (7.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.5ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.3ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test22@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "B-2BmDtvYXENGExGG9YX"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test22@example.com"], ["encrypted_password", "$2a$04$K9gHYWAlwcTSPESVfhg7Z..84aiheIh9B3Hbl7qzrEVmjfsewQJYa"], ["confirmed_at", "2016-01-08 03:42:44.139846"], ["authentication_token", "B-2BmDtvYXENGExGG9YX"], ["created_at", "2016-01-08 03:42:44.142263"], ["updated_at", "2016-01-08 03:42:44.142263"]]  (9.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:44.155834"], ["updated_at", "2016-01-08 03:42:44.155834"]]  (8.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:44.166750"], ["updated_at", "2016-01-08 03:42:44.166750"]]  (7.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test22@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test22@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:44.199603"], ["current_sign_in_at", "2016-01-08 03:42:44.199603"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:44.200237"], ["id", 1]]  (6.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"admin"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 4.9ms | ActiveRecord: 0.8ms)  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Szpcsw8noBjQYe6t8Cqk"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$5PujWBARhg33DhSnsFXUzuvV38gJ/uhUtn4iVXmPhWJQXMxttsSRK"], ["confirmed_at", "2016-01-08 03:42:44.323180"], ["authentication_token", "Szpcsw8noBjQYe6t8Cqk"], ["created_at", "2016-01-08 03:42:44.325524"], ["updated_at", "2016-01-08 03:42:44.325524"]]  (8.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 1], ["created_at", "2016-01-08 03:42:44.337479"], ["updated_at", "2016-01-08 03:42:44.337479"]]  (7.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-08 03:42:44.347878"], ["updated_at", "2016-01-08 03:42:44.347878"]]  (7.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.6ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test24@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test24@example.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-08 03:42:44.380562"], ["current_sign_in_at", "2016-01-08 03:42:44.380562"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-08 03:42:44.381221"], ["id", 1]]  (8.3ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 8.6ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-08 03:42:44 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test17"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 11ms (Views: 4.4ms | ActiveRecord: 0.8ms)  (6.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (13.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "8wBPkb6oFEuxPEzJS36N"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$0xVKBwNqJSgX8IWPfTo2Iede9QyuXGPT/IVFuzdBabYdDcNlKZCia"], ["confirmed_at", "2016-01-15 01:29:18.611871"], ["authentication_token", "8wBPkb6oFEuxPEzJS36N"], ["created_at", "2016-01-15 01:29:18.632744"], ["updated_at", "2016-01-15 01:29:18.632744"]]  (7.4ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:18.650658"], ["updated_at", "2016-01-15 01:29:18.650658"]]  (7.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:18.681155"], ["updated_at", "2016-01-15 01:29:18.681155"]]  (8.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:18 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (9.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (65.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.5ms) Completed 200 OK in 346ms (Views: 333.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test1@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:19.135538"], ["current_sign_in_at", "2016-01-15 01:29:19.135538"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:19.136365"], ["id", 1]]  (8.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 35ms (ActiveRecord: 9.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (5.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 15ms (Views: 11.1ms | ActiveRecord: 0.4ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"admin"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 11ms (Views: 4.4ms | ActiveRecord: 0.8ms)  (10.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test3@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "DYWzvEusyWJ14c9MavQR"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test3@example.com"], ["encrypted_password", "$2a$04$dEuFMgYn6pfznS90pfClzutOik6su7Kacn8mRr7DkFOXjecix.wjW"], ["confirmed_at", "2016-01-15 01:29:19.286707"], ["authentication_token", "DYWzvEusyWJ14c9MavQR"], ["created_at", "2016-01-15 01:29:19.288737"], ["updated_at", "2016-01-15 01:29:19.288737"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:19.299590"], ["updated_at", "2016-01-15 01:29:19.299590"]]  (5.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:19.308174"], ["updated_at", "2016-01-15 01:29:19.308174"]]  (5.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test3@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test3@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:19.338639"], ["current_sign_in_at", "2016-01-15 01:29:19.338639"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:19.339307"], ["id", 1]]  (5.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 5.9ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test2"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 11ms (Views: 4.3ms | ActiveRecord: 0.8ms)  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test5@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "bG5P9WEt42HVUHn4KrAg"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test5@example.com"], ["encrypted_password", "$2a$04$aCsAfRe0ed.pouihMCYrV.11WNfLE7rImmS38IZeeYn3YbyQmqQCG"], ["confirmed_at", "2016-01-15 01:29:19.453950"], ["authentication_token", "bG5P9WEt42HVUHn4KrAg"], ["created_at", "2016-01-15 01:29:19.455965"], ["updated_at", "2016-01-15 01:29:19.455965"]]  (6.1ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:19.465958"], ["updated_at", "2016-01-15 01:29:19.465958"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:19.475717"], ["updated_at", "2016-01-15 01:29:19.475717"]]  (5.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test5@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test5@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:19.505922"], ["current_sign_in_at", "2016-01-15 01:29:19.505922"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:19.506584"], ["id", 1]]  (7.3ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.6ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["created_at", "2016-01-15 01:29:19.544780"], ["updated_at", "2016-01-15 01:29:19.544780"]]  (7.5ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 1], ["created_at", "2016-01-15 01:29:19.557010"], ["updated_at", "2016-01-15 01:29:19.557010"]]  (7.6ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 SQL (0.2ms) UPDATE "mtdevise_accounts" SET "owner_id" = ?, "updated_at" = ? WHERE "mtdevise_accounts"."id" = ? [["owner_id", 1], ["updated_at", "2016-01-15 01:29:19.568163"], ["id", 2]]  (5.5ms) commit transaction Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2], ["created_at", "2016-01-15 01:29:19.585487"], ["updated_at", "2016-01-15 01:29:19.585487"]]  (7.8ms) commit transaction Mtdevise::Role Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.4ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 74ms (ActiveRecord: 39.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (10.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test7@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "1NEbzGJcuFyM9qzkZFd1"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test7@example.com"], ["encrypted_password", "$2a$04$iGyPNXUTREGx.sUzJzUoO.pga6Jb5pNSIejxEpAgTwJTo9r1XmrSC"], ["confirmed_at", "2016-01-15 01:29:19.702763"], ["authentication_token", "1NEbzGJcuFyM9qzkZFd1"], ["created_at", "2016-01-15 01:29:19.704981"], ["updated_at", "2016-01-15 01:29:19.704981"]]  (7.5ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:19.716249"], ["updated_at", "2016-01-15 01:29:19.716249"]]  (5.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:19.724691"], ["updated_at", "2016-01-15 01:29:19.724691"]]  (5.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test7@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test7@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:19.754836"], ["current_sign_in_at", "2016-01-15 01:29:19.754836"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:19.755451"], ["id", 1]]  (6.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>""}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 4.9ms | ActiveRecord: 0.9ms)  (5.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:19 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms)  (12.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test9@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "qjLQimjyhQJrxepke-a8"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test9@example.com"], ["encrypted_password", "$2a$04$iCRvGGY5K9bVWtl0U.bD/OcNT5aSEoJ2j78NW7azXQOedozX.ryfy"], ["confirmed_at", "2016-01-15 01:29:19.994595"], ["authentication_token", "qjLQimjyhQJrxepke-a8"], ["created_at", "2016-01-15 01:29:19.996871"], ["updated_at", "2016-01-15 01:29:19.996871"]]  (7.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:20.007985"], ["updated_at", "2016-01-15 01:29:20.007985"]]  (5.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:20.016585"], ["updated_at", "2016-01-15 01:29:20.016585"]]  (5.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:20 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:20 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test9@example.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:20.048080"], ["current_sign_in_at", "2016-01-15 01:29:20.048080"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:20.048788"], ["id", 1]]  (8.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 8.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:20 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms)  (5.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (11.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (11.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test11@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "7m2YC_3DgS3cvKhCJt2m"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test11@example.com"], ["encrypted_password", "$2a$04$0imT8Me/aJVHKYN7tgTnz.O00SKfPoJjLGFS2bGRF5VLBT38Ep3c."], ["confirmed_at", "2016-01-15 01:29:20.189923"], ["authentication_token", "7m2YC_3DgS3cvKhCJt2m"], ["created_at", "2016-01-15 01:29:20.191921"], ["updated_at", "2016-01-15 01:29:20.191921"]]  (6.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:20.201829"], ["updated_at", "2016-01-15 01:29:20.201829"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:20.211648"], ["updated_at", "2016-01-15 01:29:20.211648"]]  (5.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:20 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:20 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test11@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test11@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.1ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test11@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (3.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (6.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 8.8ms | ActiveRecord: 0.0ms)  (9.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test12@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "CzkZgeveAKyLtPfyeqcy"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test12@example.com"], ["encrypted_password", "$2a$04$qtYouQH/z09C6yp4LEkREuSOACJTZfQcXddKaqiMu2bYYgun8cSc2"], ["confirmed_at", "2016-01-15 01:29:20.321110"], ["authentication_token", "CzkZgeveAKyLtPfyeqcy"], ["created_at", "2016-01-15 01:29:20.323213"], ["updated_at", "2016-01-15 01:29:20.323213"]]  (7.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:20.334195"], ["updated_at", "2016-01-15 01:29:20.334195"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:20.343878"], ["updated_at", "2016-01-15 01:29:20.343878"]]  (5.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:20 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 50ms (Views: 49.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:20 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test12@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test12@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:20.413573"], ["current_sign_in_at", "2016-01-15 01:29:20.413573"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:20.414242"], ["id", 1]]  (7.3ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 7.7ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:20 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms)  (6.5ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (12.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (10.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "r5iRU2nbB6fYAKExgDTR"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "5338fd52cf06158c78314a644d48aa4df75098b59f2dc538ff289aa96c381f6d"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$zv1kv.UY0VS1EUzzHN7xBeKVsH5dCfejp8Cgdc8LatixZ0Wfdr0tG"], ["authentication_token", "r5iRU2nbB6fYAKExgDTR"], ["created_at", "2016-01-15 01:29:20.654441"], ["updated_at", "2016-01-15 01:29:20.654441"], ["confirmation_token", "YWdsbWRhEidRa9C3VfW1"], ["confirmation_sent_at", "2016-01-15 01:29:20.838947"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (4.4ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 135.0ms Sent mail to user@example.com (9.6ms) Date: Fri, 15 Jan 2016 01:29:20 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <56984b70f1cee_238b49330950ea@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:20.994748"], ["updated_at", "2016-01-15 01:29:20.994748"]]  (7.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:21.005785"], ["updated_at", "2016-01-15 01:29:21.005785"]]  (6.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:29:21.013440"], ["updated_at", "2016-01-15 01:29:21.013884"], ["id", 1]]  (6.7ms) commit transaction Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (6.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "gtBRbmqxFQgtzwRAnrYx"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$S.vYddddzswaqwVNnv8Xk.AG27N/s2AYUwknv8sbQ5n4sZU/XuYM."], ["confirmed_at", "2016-01-15 01:29:21.134156"], ["authentication_token", "gtBRbmqxFQgtzwRAnrYx"], ["created_at", "2016-01-15 01:29:21.136233"], ["updated_at", "2016-01-15 01:29:21.136233"]]  (7.1ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:21.167782"], ["current_sign_in_at", "2016-01-15 01:29:21.167782"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:21.168385"], ["id", 1]]  (10.1ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 17ms (ActiveRecord: 10.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_if_coming_form_sign_up rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.2ms)  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "QQKS6S_6d1zP7nLDLwdy"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test14@example.com"], ["encrypted_password", "$2a$04$YjCk8BSf2jwkaisbfOXqAOdmI0QzLOwOD7PS36RLNyqUGYzOUM8AW"], ["confirmed_at", "2016-01-15 01:29:21.259052"], ["authentication_token", "QQKS6S_6d1zP7nLDLwdy"], ["created_at", "2016-01-15 01:29:21.261002"], ["updated_at", "2016-01-15 01:29:21.261002"]]  (7.1ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:21.271811"], ["updated_at", "2016-01-15 01:29:21.271811"]]  (9.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:21.284342"], ["updated_at", "2016-01-15 01:29:21.284342"]]  (5.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (1.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 8ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"another name", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"test14@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"anothersubdomain"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 16ms (Views: 5.9ms | ActiveRecord: 0.9ms)  (7.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (11.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"admin"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 16ms (Views: 6.2ms | ActiveRecord: 0.9ms)  (7.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>""}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 15ms (Views: 5.2ms | ActiveRecord: 0.9ms)  (7.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "VQJ4YWojDGjoXNoBhxfG"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "38dfc7557af2f01b9fdb82fb2e15d9626e2dbe18f5cb48ec8b567467d31043d1"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "mtdevise@example.com"], ["encrypted_password", "$2a$04$TcI.xwGgXiurX0y3nsr3XOjQL4UiFtlWOFLpdDkeN8yxCqCBplyjm"], ["authentication_token", "VQJ4YWojDGjoXNoBhxfG"], ["created_at", "2016-01-15 01:29:21.645018"], ["updated_at", "2016-01-15 01:29:21.645018"], ["confirmation_token", "bwKzCx3Q44mA9xnzDrQG"], ["confirmation_sent_at", "2016-01-15 01:29:21.645803"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (2.9ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.1ms Sent mail to mtdevise@example.com (2.8ms) Date: Fri, 15 Jan 2016 01:29:21 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: mtdevise@example.com Message-ID: <56984b719f5d7_238b4933095178@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome mtdevise@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:21.654450"], ["updated_at", "2016-01-15 01:29:21.654450"]]  (8.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:21.665151"], ["updated_at", "2016-01-15 01:29:21.665151"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:29:21.673328"], ["updated_at", "2016-01-15 01:29:21.673759"], ["id", 1]]  (6.5ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:29:21.685225"], ["updated_at", "2016-01-15 01:29:21.685225"]]  (9.1ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:21.707117"], ["current_sign_in_at", "2016-01-15 01:29:21.707117"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:21.707704"], ["id", 1]]  (5.6ms) commit transaction Redirected to http://test.example.com/ Completed 302 Found in 79ms (ActiveRecord: 46.0ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.3ms)  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (11.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-15 01:29:21.813103"], ["updated_at", "2016-01-15 01:29:21.813103"]]  (6.9ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 18ms (Views: 7.0ms | ActiveRecord: 0.9ms)  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (10.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "VFU-bwWvrDs4TctSd1_z"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$DE7pDP97FwVOIlODP.J3keSZN1.cdN0IR6FIfiLWyY5Qd1gG1aUMG"], ["confirmed_at", "2016-01-15 01:29:21.972547"], ["authentication_token", "VFU-bwWvrDs4TctSd1_z"], ["created_at", "2016-01-15 01:29:21.974734"], ["updated_at", "2016-01-15 01:29:21.974734"]]  (7.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:21 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:22.007202"], ["current_sign_in_at", "2016-01-15 01:29:22.007202"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:22.007928"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 7.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.2ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Mtdevise::WelcomeController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_logged_in_users_to_account_page rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 4.0ms | ActiveRecord: 0.2ms)  (7.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (13.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (12.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.0ms)  (7.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms)  (9.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms)  (5.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (12.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test15@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "NL1TH1zPw7VwNFtYE8Q1"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test15@example.com"], ["encrypted_password", "$2a$04$tNWuS.byv9Y27z4N2QnRve5MQ2ae0D23v.Z6rgvaSKf7CYukADoLy"], ["confirmed_at", "2016-01-15 01:29:22.357342"], ["authentication_token", "NL1TH1zPw7VwNFtYE8Q1"], ["created_at", "2016-01-15 01:29:22.359437"], ["updated_at", "2016-01-15 01:29:22.359437"]]  (5.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:22.368958"], ["updated_at", "2016-01-15 01:29:22.368958"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:22.378886"], ["updated_at", "2016-01-15 01:29:22.378886"]]  (7.1ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test9"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test9"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test9"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test9"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (20.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 24ms (Views: 22.3ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test9"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test15@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test9"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test9"]] Mtdevise::User Load (0.8ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test15@example.com"]] Completed 401 Unauthorized in 6ms (ActiveRecord: 1.1ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test15@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test9"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (5.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 18ms (Views: 15.2ms | ActiveRecord: 0.0ms)  (7.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (12.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test16@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "shKx5QE17-BXMc4hV6pc"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test16@example.com"], ["encrypted_password", "$2a$04$GR2FDT7mjfY5zJblpRHhYuv3ZN7zF1hg3NX.0HBwKm4.BqpHpXP/O"], ["confirmed_at", "2016-01-15 01:29:22.528682"], ["authentication_token", "shKx5QE17-BXMc4hV6pc"], ["created_at", "2016-01-15 01:29:22.530918"], ["updated_at", "2016-01-15 01:29:22.530918"]]  (6.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:22.541511"], ["updated_at", "2016-01-15 01:29:22.541511"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:22.551452"], ["updated_at", "2016-01-15 01:29:22.551452"]]  (8.0ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test10"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test10"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.4ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test16@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test10"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test10"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test16@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:22.595920"], ["current_sign_in_at", "2016-01-15 01:29:22.595920"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:22.596616"], ["id", 1]]  (7.5ms) commit transaction Redirected to http://test10.example.com/ Completed 302 Found in 15ms (ActiveRecord: 8.0ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test10"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms)  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test17@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Jzu_yzYE9yep-k2ejaMx"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test17@example.com"], ["encrypted_password", "$2a$04$wlTNT5tJVCD5cJbPJ6rTfuLSL62.9cONR6xhVpCCWyO878LAWQ0ya"], ["confirmed_at", "2016-01-15 01:29:22.684419"], ["authentication_token", "Jzu_yzYE9yep-k2ejaMx"], ["created_at", "2016-01-15 01:29:22.686524"], ["updated_at", "2016-01-15 01:29:22.686524"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:22.697824"], ["updated_at", "2016-01-15 01:29:22.697824"]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:22.707838"], ["updated_at", "2016-01-15 01:29:22.707838"]]  (11.1ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test11"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test11"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test11"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test11"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test11"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test11"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test11"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test11"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 12ms (Views: 9.1ms | ActiveRecord: 0.0ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (11.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test18@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "cX6GkrfDsev3UXUror33"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test18@example.com"], ["encrypted_password", "$2a$04$Ds4NgrQ4t6qMgIqKYLTu7OLgE4YQVV47S8f6iAyK789ZBL/Pgusxi"], ["confirmed_at", "2016-01-15 01:29:22.837135"], ["authentication_token", "cX6GkrfDsev3UXUror33"], ["created_at", "2016-01-15 01:29:22.839315"], ["updated_at", "2016-01-15 01:29:22.839315"]]  (7.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:22.851259"], ["updated_at", "2016-01-15 01:29:22.851259"]]  (6.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:22.860817"], ["updated_at", "2016-01-15 01:29:22.860817"]]  (6.8ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test19@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "8EsEj5gxb7_DU_kZyjBv"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test19@example.com"], ["encrypted_password", "$2a$04$vbksYJs84PxNPFdjMgZKu.YajYLJIkSv3uxe4lre/VVAFJgj1PhpG"], ["confirmed_at", "2016-01-15 01:29:22.870722"], ["authentication_token", "8EsEj5gxb7_DU_kZyjBv"], ["created_at", "2016-01-15 01:29:22.872562"], ["updated_at", "2016-01-15 01:29:22.872562"]]  (7.5ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 2], ["created_at", "2016-01-15 01:29:22.883706"], ["updated_at", "2016-01-15 01:29:22.883706"]]  (5.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:29:22.892036"], ["updated_at", "2016-01-15 01:29:22.892036"]]  (5.5ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test12"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test12"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test12"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test12"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:22 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test12"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test19@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test12"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test12"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test19@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test19@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test12"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 12ms (Views: 9.4ms | ActiveRecord: 0.0ms)  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (10.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test20@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "oJEjk1Hy98Ra4_Zw1dz6"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test20@example.com"], ["encrypted_password", "$2a$04$9MPPc.Mqd/oKo1ThdxJAVuxbENI0Rz/oD7qNNQhe4UnR3DzuxHG6m"], ["confirmed_at", "2016-01-15 01:29:23.056044"], ["authentication_token", "oJEjk1Hy98Ra4_Zw1dz6"], ["created_at", "2016-01-15 01:29:23.058505"], ["updated_at", "2016-01-15 01:29:23.058505"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:23.069477"], ["updated_at", "2016-01-15 01:29:23.069477"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:23.079185"], ["updated_at", "2016-01-15 01:29:23.079185"]]  (6.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test21@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "AxdRbKWyXBNShs_UGgGF"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test21@example.com"], ["encrypted_password", "$2a$04$rO5GH5FcbkGhSTTrNmm00.SgGOgYCZXQV1e10bMv/eG16MWK9g/kq"], ["confirmed_at", "2016-01-15 01:29:23.088777"], ["authentication_token", "AxdRbKWyXBNShs_UGgGF"], ["created_at", "2016-01-15 01:29:23.090611"], ["updated_at", "2016-01-15 01:29:23.090611"]]  (7.0ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 2], ["created_at", "2016-01-15 01:29:23.101912"], ["updated_at", "2016-01-15 01:29:23.101912"]]  (7.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:29:23.111517"], ["updated_at", "2016-01-15 01:29:23.111517"]]  (8.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:29:23.126797"], ["updated_at", "2016-01-15 01:29:23.126797"]]  (6.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:29:23.134988"], ["updated_at", "2016-01-15 01:29:23.134988"]]  (7.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:23 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:23 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test21@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test21@example.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:23.167719"], ["current_sign_in_at", "2016-01-15 01:29:23.167719"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:23.168407"], ["id", 2]]  (7.4ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.8ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:23 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 2]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-15 01:29:23 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test15"]] Processing by ThingsController#index as HTML Thing Load (0.2ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 2]] Rendered things/index.html.erb within layouts/application (1.0ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.2ms)  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'things';  (11.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "a8qGcqpFPodQEgn-xSF9"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test23@example.com"], ["encrypted_password", "$2a$04$pZZDkJw.ntnCxnsuaa0woOj/ER6WsYCIfqjzFHVqKwGMRKJeDXMHq"], ["confirmed_at", "2016-01-15 01:29:23.277821"], ["authentication_token", "a8qGcqpFPodQEgn-xSF9"], ["created_at", "2016-01-15 01:29:23.280146"], ["updated_at", "2016-01-15 01:29:23.280146"]]  (5.7ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:23.290121"], ["updated_at", "2016-01-15 01:29:23.290121"]]  (6.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:23.299719"], ["updated_at", "2016-01-15 01:29:23.299719"]]  (5.8ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "RTs-gqCBfsyuc5NLaVJ-"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$sGhJGnEvgjHqSYntkY5RveJyRpGKJYqa1cueNIQkHy6fJTyx1WVQe"], ["confirmed_at", "2016-01-15 01:29:23.308682"], ["authentication_token", "RTs-gqCBfsyuc5NLaVJ-"], ["created_at", "2016-01-15 01:29:23.310544"], ["updated_at", "2016-01-15 01:29:23.310544"]]  (6.7ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 2], ["created_at", "2016-01-15 01:29:23.321221"], ["updated_at", "2016-01-15 01:29:23.321221"]]  (9.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:29:23.332994"], ["updated_at", "2016-01-15 01:29:23.332994"]]  (7.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:29:23.341568"], ["updated_at", "2016-01-15 01:29:23.341568"]]  (6.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:29:23.349435"], ["updated_at", "2016-01-15 01:29:23.349435"]]  (6.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:23 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:29:23 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test23@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test23@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:23.381969"], ["current_sign_in_at", "2016-01-15 01:29:23.381969"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:23.382603"], ["id", 1]]  (7.1ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:29:23 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-15 01:29:23 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test16"]] Processing by ThingsController#index as HTML Thing Load (0.1ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 1]] Rendered things/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.3ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "KdPD2sz-YajFfxZYG9RW"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "071af1f74aae2f50ad14a5407e496cd6496ec86331cc1a90cfd2361a4e1edee1"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$sTn1AyihngFR9gozHIN/kuu8xKQMN/sHWcCxH0az5ZURMz.Zzmenu"], ["authentication_token", "KdPD2sz-YajFfxZYG9RW"], ["created_at", "2016-01-15 01:29:23.541936"], ["updated_at", "2016-01-15 01:29:23.541936"], ["confirmation_token", "MK-wbi5L5HhtDF9NHgkF"], ["confirmation_sent_at", "2016-01-15 01:29:23.542671"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.2ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.6ms Sent mail to bb@gmail.com (2.8ms) Date: Fri, 15 Jan 2016 01:29:23 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984b7386523_238b49330952e4@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:23.551845"], ["updated_at", "2016-01-15 01:29:23.551845"]]  (6.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:23.560693"], ["updated_at", "2016-01-15 01:29:23.560693"]]  (7.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:29:23.569159"], ["updated_at", "2016-01-15 01:29:23.569599"], ["id", 1]]  (6.7ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:29:23.581008"], ["updated_at", "2016-01-15 01:29:23.581008"]]  (7.1ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (5.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:23.599322"], ["current_sign_in_at", "2016-01-15 01:29:23.599322"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:23.599866"], ["id", 1]]  (5.5ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 75ms (ActiveRecord: 41.2ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (5.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "5dxoKG2zXsTFK8C8EGKY"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "78b3dd4754a6c03939f80194c39d0b2c67553e59b4f910e7682ffd40e567c336"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$7qJfE5bidfXQ9lWd.PeutOWyrBDD5JMGPx.mmqZgBdWwLSWulOk5W"], ["authentication_token", "5dxoKG2zXsTFK8C8EGKY"], ["created_at", "2016-01-15 01:29:23.695971"], ["updated_at", "2016-01-15 01:29:23.695971"], ["confirmation_token", "XTKUozsVHxPJN221RCD1"], ["confirmation_sent_at", "2016-01-15 01:29:23.696755"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.2ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.5ms Sent mail to bb@gmail.com (2.8ms) Date: Fri, 15 Jan 2016 01:29:23 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984b73abe6f_238b493309536b@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:29:23.705736"], ["updated_at", "2016-01-15 01:29:23.705736"]]  (7.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:29:23.715996"], ["updated_at", "2016-01-15 01:29:23.715996"]]  (5.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:29:23.722807"], ["updated_at", "2016-01-15 01:29:23.723227"], ["id", 1]]  (8.5ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:29:23.736287"], ["updated_at", "2016-01-15 01:29:23.736287"]]  (8.8ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (6.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:29:23.757430"], ["current_sign_in_at", "2016-01-15 01:29:23.757430"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:29:23.757923"], ["id", 1]]  (6.5ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 79ms (ActiveRecord: 46.6ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "eqem8E6pv_3VPtSe24Yy"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$Iafwt.2VDfKLKtiJievc0OAi3soiEVzGnkWyqmgMHFWHSLc8rDfHC"], ["confirmed_at", "2016-01-15 01:30:46.353227"], ["authentication_token", "eqem8E6pv_3VPtSe24Yy"], ["created_at", "2016-01-15 01:30:46.372705"], ["updated_at", "2016-01-15 01:30:46.372705"]]  (7.3ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:46.390516"], ["updated_at", "2016-01-15 01:30:46.390516"]]  (7.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:46.420973"], ["updated_at", "2016-01-15 01:30:46.420973"]]  (7.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:46 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (8.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (65.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.6ms) Completed 200 OK in 270ms (Views: 257.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:46 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test1@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:46.797044"], ["current_sign_in_at", "2016-01-15 01:30:46.797044"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:46.797797"], ["id", 1]]  (9.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 32ms (ActiveRecord: 10.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:46 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 15ms (ActiveRecord: 0.2ms)  (9.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test3@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "gz8LmQEkmisH_PboawxW"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test3@example.com"], ["encrypted_password", "$2a$04$kASsMLmGCu769luHdSyvB.zyrQGb8lho0zgPQr67aHfjKCxan8Xiq"], ["confirmed_at", "2016-01-15 01:30:46.913037"], ["authentication_token", "gz8LmQEkmisH_PboawxW"], ["created_at", "2016-01-15 01:30:46.915307"], ["updated_at", "2016-01-15 01:30:46.915307"]]  (5.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:46.925118"], ["updated_at", "2016-01-15 01:30:46.925118"]]  (6.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:46.934642"], ["updated_at", "2016-01-15 01:30:46.934642"]]  (6.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:46 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.6ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:46 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test3@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test3@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test3@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 10.4ms | ActiveRecord: 0.0ms)  (6.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "xqxkyPJJyAUbtmdW37gW"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "3b531f99de7ee3925948f7991a60ef4403475e091222002331ff98a0812e0e13"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$7XmpByXWiwgdfzwr284heOxvKHSFcusKz3OVKyxOJ37YeRQHL31Gm"], ["authentication_token", "xqxkyPJJyAUbtmdW37gW"], ["created_at", "2016-01-15 01:30:47.114443"], ["updated_at", "2016-01-15 01:30:47.114443"], ["confirmation_token", "xzASnFHxgs3SzyzZWdZK"], ["confirmation_sent_at", "2016-01-15 01:30:47.298982"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (4.5ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 117.3ms Sent mail to bb@gmail.com (9.4ms) Date: Fri, 15 Jan 2016 01:30:47 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984bc76981c_25eb35330270a1@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:47.436420"], ["updated_at", "2016-01-15 01:30:47.436420"]]  (7.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:47.447102"], ["updated_at", "2016-01-15 01:30:47.447102"]]  (8.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:30:47.456547"], ["updated_at", "2016-01-15 01:30:47.457016"], ["id", 1]]  (7.0ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:30:47.478774"], ["updated_at", "2016-01-15 01:30:47.478774"]]  (8.7ms) commit transaction Mtdevise::Role Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (6.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:47.509416"], ["current_sign_in_at", "2016-01-15 01:30:47.509416"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:47.509983"], ["id", 1]]  (6.6ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 416ms (ActiveRecord: 49.0ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "g55fuC2MD49iReNH4BEA"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "26142df0e9478ad16409b3244a7095eaf57645c58a86957340e26043e475ce1d"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$s4ELio9XVuYmV6CnbA0WkOb7vcaVG3FEj6i36MUrP8LkXrkNRSfx2"], ["authentication_token", "g55fuC2MD49iReNH4BEA"], ["created_at", "2016-01-15 01:30:47.611611"], ["updated_at", "2016-01-15 01:30:47.611611"], ["confirmation_token", "a8qv1A8v28HZcjNBFyWe"], ["confirmation_sent_at", "2016-01-15 01:30:47.612333"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (2.9ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.1ms Sent mail to bb@gmail.com (2.6ms) Date: Fri, 15 Jan 2016 01:30:47 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984bc797314_25eb35330271b5@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:47.620893"], ["updated_at", "2016-01-15 01:30:47.620893"]]  (7.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:47.631345"], ["updated_at", "2016-01-15 01:30:47.631345"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:30:47.639234"], ["updated_at", "2016-01-15 01:30:47.639660"], ["id", 1]]  (5.8ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:30:47.649995"], ["updated_at", "2016-01-15 01:30:47.649995"]]  (7.3ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:47.669879"], ["current_sign_in_at", "2016-01-15 01:30:47.669879"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:47.670436"], ["id", 1]]  (6.6ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 77ms (ActiveRecord: 44.0ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (9.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (8.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "8kssTgz3cmukxP4bs7UU"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$i.coyIgRDR1dND6Ju7YjbeXCo9cjlkOH6.fyI/UGXJfQ.V/xKhp2G"], ["confirmed_at", "2016-01-15 01:30:47.898174"], ["authentication_token", "8kssTgz3cmukxP4bs7UU"], ["created_at", "2016-01-15 01:30:47.900375"], ["updated_at", "2016-01-15 01:30:47.900375"]]  (7.3ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:47 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:47 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:47.932614"], ["current_sign_in_at", "2016-01-15 01:30:47.932614"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:47.933286"], ["id", 1]]  (7.2ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:47 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 11.8ms | ActiveRecord: 0.0ms)  (6.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.0ms)  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.4ms) DELETE FROM "mtdevise_members";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms)  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (10.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test4@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "xvGWKQUfzVEopnhNbfPf"]] SQL (0.1ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test4@example.com"], ["encrypted_password", "$2a$04$Z.ZdbclU8nKVmtSMViYPieFSO3UBshy1KVVRfMLktbR7GPs1h7GSy"], ["confirmed_at", "2016-01-15 01:30:48.271748"], ["authentication_token", "xvGWKQUfzVEopnhNbfPf"], ["created_at", "2016-01-15 01:30:48.273957"], ["updated_at", "2016-01-15 01:30:48.273957"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:48.284818"], ["updated_at", "2016-01-15 01:30:48.284818"]]  (6.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:48.294413"], ["updated_at", "2016-01-15 01:30:48.294413"]]  (10.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test4@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test4@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:48.329700"], ["current_sign_in_at", "2016-01-15 01:30:48.329700"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:48.330410"], ["id", 1]]  (6.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test6@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Nx2o7Xi-x9ZV7ZQ4CZNy"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test6@example.com"], ["encrypted_password", "$2a$04$rXuoAoCxo1JQijM6X3tk3egMJ9PCV/FwHVMV7oPYYNKoBS8e0BKSW"], ["confirmed_at", "2016-01-15 01:30:48.412871"], ["authentication_token", "Nx2o7Xi-x9ZV7ZQ4CZNy"], ["created_at", "2016-01-15 01:30:48.414842"], ["updated_at", "2016-01-15 01:30:48.414842"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:48.425625"], ["updated_at", "2016-01-15 01:30:48.425625"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:48.435215"], ["updated_at", "2016-01-15 01:30:48.435215"]]  (6.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test6@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test6@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:48.467866"], ["current_sign_in_at", "2016-01-15 01:30:48.467866"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:48.468553"], ["id", 1]]  (8.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 17ms (ActiveRecord: 9.2ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test8@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "1diUEWgynMFKgJz1wwpF"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test8@example.com"], ["encrypted_password", "$2a$04$t8L4Q5Q4qeTQykzz3eaPR.ryyMbvBLoE7.PG6d.IT7EfYGEjrxLY2"], ["confirmed_at", "2016-01-15 01:30:48.556827"], ["authentication_token", "1diUEWgynMFKgJz1wwpF"], ["created_at", "2016-01-15 01:30:48.559059"], ["updated_at", "2016-01-15 01:30:48.559059"]]  (7.5ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:48.570470"], ["updated_at", "2016-01-15 01:30:48.570470"]]  (9.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:48.582307"], ["updated_at", "2016-01-15 01:30:48.582307"]]  (7.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test8@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test8@example.com"]]  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:48.613791"], ["current_sign_in_at", "2016-01-15 01:30:48.613791"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:48.614434"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test10@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "y_y1Eg_jRUxMXn8SrCNj"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test10@example.com"], ["encrypted_password", "$2a$04$4xRAUXVvm0ywjlkoIhdGsuePJWmLIP16.ynUiebXD8GvKdFeBU1vi"], ["confirmed_at", "2016-01-15 01:30:48.695213"], ["authentication_token", "y_y1Eg_jRUxMXn8SrCNj"], ["created_at", "2016-01-15 01:30:48.697247"], ["updated_at", "2016-01-15 01:30:48.697247"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:48.708129"], ["updated_at", "2016-01-15 01:30:48.708129"]]  (7.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:48.718689"], ["updated_at", "2016-01-15 01:30:48.718689"]]  (6.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test10@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test10@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:48.751561"], ["current_sign_in_at", "2016-01-15 01:30:48.751561"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:48.752262"], ["id", 1]]  (6.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "icTaBTrpBnucvaH5GV_4"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$obqucrm.gqUSbjPgOFMgo.c6P3wRBRLqPRmBMlaJTRjbWxaWrVIXq"], ["confirmed_at", "2016-01-15 01:30:48.880966"], ["authentication_token", "icTaBTrpBnucvaH5GV_4"], ["created_at", "2016-01-15 01:30:48.883349"], ["updated_at", "2016-01-15 01:30:48.883349"]]  (5.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:48.914159"], ["current_sign_in_at", "2016-01-15 01:30:48.914159"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:48.914794"], ["id", 1]]  (8.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 9.0ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-15 01:30:48.983239"], ["updated_at", "2016-01-15 01:30:48.983239"]]  (7.3ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:48 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (7.3ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (5.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test12@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "SqW3WEjsXxey3XnPyuAD"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test12@example.com"], ["encrypted_password", "$2a$04$3RSipxtof2b2RmzY5VqpTu7/ySXBkYZK9ahZUbiRjZFIZvRCof9gW"], ["confirmed_at", "2016-01-15 01:30:49.177886"], ["authentication_token", "SqW3WEjsXxey3XnPyuAD"], ["created_at", "2016-01-15 01:30:49.180248"], ["updated_at", "2016-01-15 01:30:49.180248"]]  (7.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:49.191490"], ["updated_at", "2016-01-15 01:30:49.191490"]]  (5.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:49.200182"], ["updated_at", "2016-01-15 01:30:49.200182"]]  (5.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (9.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (6.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "K_LZC2MAX9CkfDxp4-zt"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "489ec470c6c35fb2039d0acd3692bbc0ec8f9ee008ad726e75c93aec76bee7fb"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$jFp3rYk70CnVhE/U66JwneSDT.VYVCxfJQl8uOOIZ70W74/dl52.a"], ["authentication_token", "K_LZC2MAX9CkfDxp4-zt"], ["created_at", "2016-01-15 01:30:49.400263"], ["updated_at", "2016-01-15 01:30:49.400263"], ["confirmation_token", "v7vAS1XLCvTxSGYpEi17"], ["confirmation_sent_at", "2016-01-15 01:30:49.400983"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.6ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 5.0ms Sent mail to user@example.com (2.8ms) Date: Fri, 15 Jan 2016 01:30:49 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <56984bc963d6b_25eb35330272c2@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:49.410546"], ["updated_at", "2016-01-15 01:30:49.410546"]]  (7.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:49.420717"], ["updated_at", "2016-01-15 01:30:49.420717"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:30:49.428808"], ["updated_at", "2016-01-15 01:30:49.429203"], ["id", 1]]  (9.4ms) commit transaction Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test13@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "D-fKLo6NcSe99ZF595Ls"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test13@example.com"], ["encrypted_password", "$2a$04$kR45f3/vl.fmg/QDlo2bGeUk/Ufrp8Fog1JQ3dyAr8253d4vbyQjm"], ["confirmed_at", "2016-01-15 01:30:49.554123"], ["authentication_token", "D-fKLo6NcSe99ZF595Ls"], ["created_at", "2016-01-15 01:30:49.556322"], ["updated_at", "2016-01-15 01:30:49.556322"]]  (5.9ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:49.566092"], ["updated_at", "2016-01-15 01:30:49.566092"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:49.575949"], ["updated_at", "2016-01-15 01:30:49.575949"]]  (5.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "x128BQharYwoLtj_Tdg2"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test14@example.com"], ["encrypted_password", "$2a$04$jbrZCaaRc3Bg6/dnhQXT3OhIUtzetKrlzihYAxs/2gfynEpNUIgV2"], ["confirmed_at", "2016-01-15 01:30:49.584905"], ["authentication_token", "x128BQharYwoLtj_Tdg2"], ["created_at", "2016-01-15 01:30:49.586658"], ["updated_at", "2016-01-15 01:30:49.586658"]]  (9.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 2], ["created_at", "2016-01-15 01:30:49.599895"], ["updated_at", "2016-01-15 01:30:49.599895"]]  (5.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:30:49.608285"], ["updated_at", "2016-01-15 01:30:49.608285"]]  (5.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:30:49.619555"], ["updated_at", "2016-01-15 01:30:49.619555"]]  (6.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:30:49.627808"], ["updated_at", "2016-01-15 01:30:49.627808"]]  (5.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test14@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test14@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:49.658273"], ["current_sign_in_at", "2016-01-15 01:30:49.658273"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:49.658914"], ["id", 2]]  (7.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.9ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test16@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "8AJb9yvxxv7i_yMCadxB"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test16@example.com"], ["encrypted_password", "$2a$04$OgtiZMxCKbdVGxkCeJIPAO0M0eovmbchPhEecae6WWUDjgvOVGZ2O"], ["confirmed_at", "2016-01-15 01:30:49.748311"], ["authentication_token", "8AJb9yvxxv7i_yMCadxB"], ["created_at", "2016-01-15 01:30:49.750300"], ["updated_at", "2016-01-15 01:30:49.750300"]]  (7.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:49.761141"], ["updated_at", "2016-01-15 01:30:49.761141"]]  (6.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:49.770857"], ["updated_at", "2016-01-15 01:30:49.770857"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test17@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "XkK4fMyoCkZbU4ZxhQSh"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test17@example.com"], ["encrypted_password", "$2a$04$ZkqE7ia7XH2fnCiBtSdD8.o0VC9qL13Fz6ka3TiVNFxIlZsjg2gQG"], ["confirmed_at", "2016-01-15 01:30:49.780831"], ["authentication_token", "XkK4fMyoCkZbU4ZxhQSh"], ["created_at", "2016-01-15 01:30:49.782748"], ["updated_at", "2016-01-15 01:30:49.782748"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 2], ["created_at", "2016-01-15 01:30:49.793448"], ["updated_at", "2016-01-15 01:30:49.793448"]]  (8.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:30:49.804477"], ["updated_at", "2016-01-15 01:30:49.804477"]]  (5.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:30:49.811600"], ["updated_at", "2016-01-15 01:30:49.811600"]]  (6.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:30:49.819440"], ["updated_at", "2016-01-15 01:30:49.819440"]]  (6.9ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test16@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test16@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:49.850345"], ["current_sign_in_at", "2016-01-15 01:30:49.850345"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:49.851037"], ["id", 1]]  (5.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.0ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:49 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.2ms)  (5.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test19@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "E8Zxd76rs7jPTTNhUVAa"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test19@example.com"], ["encrypted_password", "$2a$04$NaSIEtaL4HOU0uoWzD0ji.tL3HcG02NibVAJIRpE26ntfN1FUiWOe"], ["confirmed_at", "2016-01-15 01:30:49.983805"], ["authentication_token", "E8Zxd76rs7jPTTNhUVAa"], ["created_at", "2016-01-15 01:30:49.985843"], ["updated_at", "2016-01-15 01:30:49.985843"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:49.996426"], ["updated_at", "2016-01-15 01:30:49.996426"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:50.006357"], ["updated_at", "2016-01-15 01:30:50.006357"]]  (6.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test12"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test12"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test12"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test12"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test12"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test12"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test12"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.5ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test12"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.4ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test20@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "sxNJTpms_sFeqys8QT-z"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test20@example.com"], ["encrypted_password", "$2a$04$1oh2/d3olziO/CIyTRIhh.Yn0D7DkjsFNza5nUxSTqEQJgBn6Dkxy"], ["confirmed_at", "2016-01-15 01:30:50.129819"], ["authentication_token", "sxNJTpms_sFeqys8QT-z"], ["created_at", "2016-01-15 01:30:50.131982"], ["updated_at", "2016-01-15 01:30:50.131982"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:50.141646"], ["updated_at", "2016-01-15 01:30:50.141646"]]  (9.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:50.154256"], ["updated_at", "2016-01-15 01:30:50.154256"]]  (6.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test20@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test13"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test20@example.com"]] Completed 401 Unauthorized in 4ms (ActiveRecord: 0.3ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test20@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test13"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 0.0ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test21@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Wfdgd5bjBsAVp97UvBcX"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test21@example.com"], ["encrypted_password", "$2a$04$N2.lGn/5eKcv2H9JXS6YpuRxo1qxgJ9JdtHi/XfGVuT2TxK47RoB."], ["confirmed_at", "2016-01-15 01:30:50.276537"], ["authentication_token", "Wfdgd5bjBsAVp97UvBcX"], ["created_at", "2016-01-15 01:30:50.278658"], ["updated_at", "2016-01-15 01:30:50.278658"]]  (7.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:50.289534"], ["updated_at", "2016-01-15 01:30:50.289534"]]  (7.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:50.299238"], ["updated_at", "2016-01-15 01:30:50.299238"]]  (8.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test22@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "85UBLCN1Bg6pmttxjHyA"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test22@example.com"], ["encrypted_password", "$2a$04$JiBCi0uqSVaK4f1AV4PSnOhZlbamU2xWBpBFXNApsJreRJKzbjhX2"], ["confirmed_at", "2016-01-15 01:30:50.310551"], ["authentication_token", "85UBLCN1Bg6pmttxjHyA"], ["created_at", "2016-01-15 01:30:50.312272"], ["updated_at", "2016-01-15 01:30:50.312272"]]  (5.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 2], ["created_at", "2016-01-15 01:30:50.321644"], ["updated_at", "2016-01-15 01:30:50.321644"]]  (6.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:30:50.330937"], ["updated_at", "2016-01-15 01:30:50.330937"]]  (7.4ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test14"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test22@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test14"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test22@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.3ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test22@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test14"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 12ms (Views: 9.3ms | ActiveRecord: 0.0ms)  (5.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "tQ3uMxy_B3nWBSkyxVi_"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test23@example.com"], ["encrypted_password", "$2a$04$Q4zLHCH.wYwPeD3q39aQneLTJllo5796evnInI7nKPVTn7HjN7XP6"], ["confirmed_at", "2016-01-15 01:30:50.449683"], ["authentication_token", "tQ3uMxy_B3nWBSkyxVi_"], ["created_at", "2016-01-15 01:30:50.451753"], ["updated_at", "2016-01-15 01:30:50.451753"]]  (8.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:50.464410"], ["updated_at", "2016-01-15 01:30:50.464410"]]  (5.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:50.472946"], ["updated_at", "2016-01-15 01:30:50.472946"]]  (5.4ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test16"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test16"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test16"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test16"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.6ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test16"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test23@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test16"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test16"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test23@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:50.509485"], ["current_sign_in_at", "2016-01-15 01:30:50.509485"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:50.510199"], ["id", 1]]  (6.6ms) commit transaction Redirected to http://test16.example.com/ Completed 302 Found in 14ms (ActiveRecord: 7.1ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test16"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test16"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 0.2ms)  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (12.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (10.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (8.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Ci3zDwJo7uPJgwQQJTxu"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$tOuMWiCtpUU.34TXaUsTee0GqQ736jpVP4EXsuonzclIjdhDGYtDG"], ["confirmed_at", "2016-01-15 01:30:50.654186"], ["authentication_token", "Ci3zDwJo7uPJgwQQJTxu"], ["created_at", "2016-01-15 01:30:50.656348"], ["updated_at", "2016-01-15 01:30:50.656348"]]  (8.3ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 1], ["created_at", "2016-01-15 01:30:50.668517"], ["updated_at", "2016-01-15 01:30:50.668517"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:30:50.678196"], ["updated_at", "2016-01-15 01:30:50.678196"]]  (6.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test24@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test24@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:30:50.709780"], ["current_sign_in_at", "2016-01-15 01:30:50.709780"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:30:50.710470"], ["id", 1]]  (8.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 9.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:30:50 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms)  (9.3ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (11.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "CLh-fpfyx7zQXQzErLVG"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$99GBK7wuIfDNyeW.BS.JwO2MrgXi1KA8v2LhOOPGNVRrYPfAJpuPK"], ["confirmed_at", "2016-01-15 01:31:38.569653"], ["authentication_token", "CLh-fpfyx7zQXQzErLVG"], ["created_at", "2016-01-15 01:31:38.589511"], ["updated_at", "2016-01-15 01:31:38.589511"]]  (7.3ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:38.607095"], ["updated_at", "2016-01-15 01:31:38.607095"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:38.637291"], ["updated_at", "2016-01-15 01:31:38.637291"]]  (7.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:38 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (8.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (65.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.5ms) Completed 200 OK in 269ms (Views: 256.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test1@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:39.013122"], ["current_sign_in_at", "2016-01-15 01:31:39.013122"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:39.013945"], ["id", 1]]  (8.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 31ms (ActiveRecord: 9.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 14ms (ActiveRecord: 0.2ms)  (6.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test3@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "foS-YUjREvBT6D7inoYx"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test3@example.com"], ["encrypted_password", "$2a$04$SDXZSVDkLhROyZbIFdb8d.01CExkv9B8Xa.VXBSetAtd.cB9qUJHu"], ["confirmed_at", "2016-01-15 01:31:39.121706"], ["authentication_token", "foS-YUjREvBT6D7inoYx"], ["created_at", "2016-01-15 01:31:39.123952"], ["updated_at", "2016-01-15 01:31:39.123952"]]  (8.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:39.136387"], ["updated_at", "2016-01-15 01:31:39.136387"]]  (5.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:39.144684"], ["updated_at", "2016-01-15 01:31:39.144684"]]  (5.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test3@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test3@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:39.175288"], ["current_sign_in_at", "2016-01-15 01:31:39.175288"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:39.175932"], ["id", 1]]  (6.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (6.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test5@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "QzE4m4BXRgC5Re8Vkvbv"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test5@example.com"], ["encrypted_password", "$2a$04$SCHsdi/ZJjFtNRenY9CQ1u81bB1BuMNlQk/u5okQ2wis/oN6Yh9vy"], ["confirmed_at", "2016-01-15 01:31:39.258059"], ["authentication_token", "QzE4m4BXRgC5Re8Vkvbv"], ["created_at", "2016-01-15 01:31:39.260215"], ["updated_at", "2016-01-15 01:31:39.260215"]]  (7.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:39.271910"], ["updated_at", "2016-01-15 01:31:39.271910"]]  (5.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:39.280568"], ["updated_at", "2016-01-15 01:31:39.280568"]]  (5.9ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test5@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test5@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:39.310740"], ["current_sign_in_at", "2016-01-15 01:31:39.310740"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:39.311336"], ["id", 1]]  (6.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (11.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test7@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "rMTmi7j2cHbjbp67hXaS"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test7@example.com"], ["encrypted_password", "$2a$04$yamT4fRkz/vlp3X1JrIiiuQTxAqHIfnLUyY/GSplvsGjlCps8IH0e"], ["confirmed_at", "2016-01-15 01:31:39.392848"], ["authentication_token", "rMTmi7j2cHbjbp67hXaS"], ["created_at", "2016-01-15 01:31:39.394810"], ["updated_at", "2016-01-15 01:31:39.394810"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:39.405634"], ["updated_at", "2016-01-15 01:31:39.405634"]]  (6.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:39.414800"], ["updated_at", "2016-01-15 01:31:39.414800"]]  (6.9ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test7@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test7@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:39.445022"], ["current_sign_in_at", "2016-01-15 01:31:39.445022"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:39.445638"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:39 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (10.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "UtreoS9UNFTH2rDPcrF1"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "1e394e48cf8a0174bde8f7c4cef62e335bac54922c758803b65b9e7850a70b24"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$rJ5m2otIb9p5CL9r8Y45QOMRzGD0i1rWS/Bzq9lARAP86qAixve/2"], ["authentication_token", "UtreoS9UNFTH2rDPcrF1"], ["created_at", "2016-01-15 01:31:39.586333"], ["updated_at", "2016-01-15 01:31:39.586333"], ["confirmation_token", "UGQ4Q-z6xNKonDPh-FNH"], ["confirmation_sent_at", "2016-01-15 01:31:39.771010"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (4.8ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 119.5ms Sent mail to bb@gmail.com (9.0ms) Date: Fri, 15 Jan 2016 01:31:39 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984bfbdd2fb_28367d3246888a@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:39.910140"], ["updated_at", "2016-01-15 01:31:39.910140"]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:39.920554"], ["updated_at", "2016-01-15 01:31:39.920554"]]  (5.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:31:39.927111"], ["updated_at", "2016-01-15 01:31:39.927551"], ["id", 1]]  (5.9ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:31:39.948076"], ["updated_at", "2016-01-15 01:31:39.948076"]]  (7.7ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:39.977193"], ["current_sign_in_at", "2016-01-15 01:31:39.977193"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:39.977734"], ["id", 1]]  (6.6ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 411ms (ActiveRecord: 43.7ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Eyu79QBMzKkZ95z_Ar6_"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "73f929656d0e9f0ccea02ca9625de9568a85a7bfbe417046d58842bd838a9ac4"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$kekh3v9zIGEE29FD4cAQTO4KsAme3IDWVm7mb3qSRtx51n0OAg5Zy"], ["authentication_token", "Eyu79QBMzKkZ95z_Ar6_"], ["created_at", "2016-01-15 01:31:40.088752"], ["updated_at", "2016-01-15 01:31:40.088752"], ["confirmation_token", "RyK8dTAgKsGxVcvhytVN"], ["confirmation_sent_at", "2016-01-15 01:31:40.089562"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.5ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.9ms Sent mail to bb@gmail.com (2.7ms) Date: Fri, 15 Jan 2016 01:31:40 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984bfc17c12_28367d324689d9@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:40.099005"], ["updated_at", "2016-01-15 01:31:40.099005"]]  (8.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:40.109932"], ["updated_at", "2016-01-15 01:31:40.109932"]]  (6.8ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:31:40.117833"], ["updated_at", "2016-01-15 01:31:40.118302"], ["id", 1]]  (7.0ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:31:40.129966"], ["updated_at", "2016-01-15 01:31:40.129966"]]  (6.8ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (6.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:40.149339"], ["current_sign_in_at", "2016-01-15 01:31:40.149339"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:40.149860"], ["id", 1]]  (8.7ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 95ms (ActiveRecord: 47.0ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (7.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "VarwhhvEoV5oUepE1zs7"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "19e5a0202e5eb381a218346202b0c29944211b395f5b130538ada29764697c65"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$/N7x2b.2DD9XFzUnnKXsPOooXscZdbRjWbnv4P9rH4sXzQUHnyekm"], ["authentication_token", "VarwhhvEoV5oUepE1zs7"], ["created_at", "2016-01-15 01:31:40.281463"], ["updated_at", "2016-01-15 01:31:40.281463"], ["confirmation_token", "kutYFEyx4_2SubJwLMvk"], ["confirmation_sent_at", "2016-01-15 01:31:40.282227"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.7ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 5.0ms Sent mail to user@example.com (2.8ms) Date: Fri, 15 Jan 2016 01:31:40 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <56984bfc46d5e_28367d3246901c@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:40.291753"], ["updated_at", "2016-01-15 01:31:40.291753"]]  (6.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:40.300819"], ["updated_at", "2016-01-15 01:31:40.300819"]]  (5.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:31:40.307335"], ["updated_at", "2016-01-15 01:31:40.307734"], ["id", 1]]  (5.7ms) commit transaction Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (5.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test9@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "dzGdZ2jwaGsySDTkDC2c"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test9@example.com"], ["encrypted_password", "$2a$04$uwjQWebba2/SmEXCV/Ny.uPbYW/C.ceFKTZxiZFQNEGscVo9O8bkW"], ["confirmed_at", "2016-01-15 01:31:40.429439"], ["authentication_token", "dzGdZ2jwaGsySDTkDC2c"], ["created_at", "2016-01-15 01:31:40.431670"], ["updated_at", "2016-01-15 01:31:40.431670"]]  (6.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:40.441502"], ["updated_at", "2016-01-15 01:31:40.441502"]]  (6.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:40.450994"], ["updated_at", "2016-01-15 01:31:40.450994"]]  (6.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.2ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 11.3ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test5"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test5"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test9@example.com"]] Completed 401 Unauthorized in 5ms (ActiveRecord: 0.5ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test5"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (11.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 17ms (Views: 13.9ms | ActiveRecord: 0.0ms)  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test10@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "X3BrtKH1cwi6SzQu-m-f"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test10@example.com"], ["encrypted_password", "$2a$04$PRTDFVPkJxnGsrcLPyPMnOaXTOuShBYg7B758UkefjdQDUKAAoO2O"], ["confirmed_at", "2016-01-15 01:31:40.590779"], ["authentication_token", "X3BrtKH1cwi6SzQu-m-f"], ["created_at", "2016-01-15 01:31:40.593090"], ["updated_at", "2016-01-15 01:31:40.593090"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:40.604273"], ["updated_at", "2016-01-15 01:31:40.604273"]]  (5.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:40.612767"], ["updated_at", "2016-01-15 01:31:40.612767"]]  (5.6ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.6ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test6"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.0ms)  (7.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test11@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "jTw_T5WFVUo6T_k3aX4x"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test11@example.com"], ["encrypted_password", "$2a$04$IEPl2digtYn8peO3qUfVu.OjNCasPbzKzrs/UZmnMdlrxnMJWQA5S"], ["confirmed_at", "2016-01-15 01:31:40.728973"], ["authentication_token", "jTw_T5WFVUo6T_k3aX4x"], ["created_at", "2016-01-15 01:31:40.731215"], ["updated_at", "2016-01-15 01:31:40.731215"]]  (5.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:40.741111"], ["updated_at", "2016-01-15 01:31:40.741111"]]  (6.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:40.750730"], ["updated_at", "2016-01-15 01:31:40.750730"]]  (6.4ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test7"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test7"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test7"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test7"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test7"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test11@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test7"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test7"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test11@example.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:40.789607"], ["current_sign_in_at", "2016-01-15 01:31:40.789607"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:40.790349"], ["id", 1]]  (6.8ms) commit transaction Redirected to http://test7.example.com/ Completed 302 Found in 14ms (ActiveRecord: 7.3ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test7"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test7"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.2ms)  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test12@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "rwoWaUi1x88hyeGFrxxs"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test12@example.com"], ["encrypted_password", "$2a$04$6GhPhroISmlx60u25HauK.q50kW1JXh7NmrX3p5GBR.N7H7Apwyp6"], ["confirmed_at", "2016-01-15 01:31:40.886827"], ["authentication_token", "rwoWaUi1x88hyeGFrxxs"], ["created_at", "2016-01-15 01:31:40.889011"], ["updated_at", "2016-01-15 01:31:40.889011"]]  (6.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:40.899710"], ["updated_at", "2016-01-15 01:31:40.899710"]]  (5.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:40.908159"], ["updated_at", "2016-01-15 01:31:40.908159"]]  (5.4ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test13@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "4ZUyG3TDcdYEnREPYrjV"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test13@example.com"], ["encrypted_password", "$2a$04$TMYKJ3p7j6VZEPOR.6Vuv.uwmOUeSHCX9UB9voWDAYCyzdMpphYYe"], ["confirmed_at", "2016-01-15 01:31:40.916621"], ["authentication_token", "4ZUyG3TDcdYEnREPYrjV"], ["created_at", "2016-01-15 01:31:40.918469"], ["updated_at", "2016-01-15 01:31:40.918469"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 2], ["created_at", "2016-01-15 01:31:40.929091"], ["updated_at", "2016-01-15 01:31:40.929091"]]  (6.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:31:40.938592"], ["updated_at", "2016-01-15 01:31:40.938592"]]  (7.0ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test8"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test8"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test8"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test8"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.5ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:40 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test8"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test13@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test8"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test8"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test13@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.3ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test13@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test8"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 10.7ms | ActiveRecord: 0.0ms)  (5.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "rBR7kEXVT-x-jcebc2tm"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test14@example.com"], ["encrypted_password", "$2a$04$WBBWYeGelsaTGtN1LgLro.SlVtGwG23O03vqIFk85Rl/RHE0p1q/i"], ["confirmed_at", "2016-01-15 01:31:41.104037"], ["authentication_token", "rBR7kEXVT-x-jcebc2tm"], ["created_at", "2016-01-15 01:31:41.106442"], ["updated_at", "2016-01-15 01:31:41.106442"]]  (7.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:41.118041"], ["updated_at", "2016-01-15 01:31:41.118041"]]  (6.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:41.127469"], ["updated_at", "2016-01-15 01:31:41.127469"]]  (6.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test14@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test14@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.1ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test14@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.0ms)  (9.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test15@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "EbxYcozzk4V8fGhTTdyM"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test15@example.com"], ["encrypted_password", "$2a$04$bJA6ER/T6Zdk2ewXEYN7FulmgwAHGn5jzbM4Kj6P7OcnlcDv35Htu"], ["confirmed_at", "2016-01-15 01:31:41.238318"], ["authentication_token", "EbxYcozzk4V8fGhTTdyM"], ["created_at", "2016-01-15 01:31:41.240463"], ["updated_at", "2016-01-15 01:31:41.240463"]]  (7.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:41.251575"], ["updated_at", "2016-01-15 01:31:41.251575"]]  (5.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:41.259766"], ["updated_at", "2016-01-15 01:31:41.259766"]]  (5.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test15@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test15@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:41.291094"], ["current_sign_in_at", "2016-01-15 01:31:41.291094"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:41.291761"], ["id", 1]]  (5.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 6.2ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.0ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.8ms) DELETE FROM "mtdevise_users";  (0.3ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.5ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (1.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (6.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.8ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"admin"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 18ms (Views: 6.2ms | ActiveRecord: 1.0ms)  (9.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test17@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "dm3CzKvxVN6anpt6C7Vv"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test17@example.com"], ["encrypted_password", "$2a$04$dOkgwy6GA.TfG1vMeuY3PuhReBphJw6dRuYzuWTHSiDqRD1kvqeuC"], ["confirmed_at", "2016-01-15 01:31:41.626159"], ["authentication_token", "dm3CzKvxVN6anpt6C7Vv"], ["created_at", "2016-01-15 01:31:41.628470"], ["updated_at", "2016-01-15 01:31:41.628470"]]  (7.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:41.640075"], ["updated_at", "2016-01-15 01:31:41.640075"]]  (5.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:41.648645"], ["updated_at", "2016-01-15 01:31:41.648645"]]  (5.6ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"another name", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"test17@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"anothersubdomain"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test17@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test17@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 17ms (Views: 6.2ms | ActiveRecord: 1.0ms)  (7.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-15 01:31:41.773664"], ["updated_at", "2016-01-15 01:31:41.773664"]]  (6.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 19ms (Views: 7.1ms | ActiveRecord: 1.0ms)  (6.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.6ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.3ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "nRnCx_Zp3PFyfPsvzHmY"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "15954e250e01bb6f5080181bc696efa8b4ac39b9978b90b09e09a9ee2c9b93e1"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "mtdevise@example.com"], ["encrypted_password", "$2a$04$owMnEX4uZgL35KQu.j/quuGHS4aN7BEVeu2gzfgxQAMOD4gO84iKa"], ["authentication_token", "nRnCx_Zp3PFyfPsvzHmY"], ["created_at", "2016-01-15 01:31:41.922821"], ["updated_at", "2016-01-15 01:31:41.922821"], ["confirmation_token", "TttwFRqxbEDLA_AtQh6v"], ["confirmation_sent_at", "2016-01-15 01:31:41.923615"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.8ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 5.1ms Sent mail to mtdevise@example.com (2.7ms) Date: Fri, 15 Jan 2016 01:31:41 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: mtdevise@example.com Message-ID: <56984bfde3761_28367d32469145@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome mtdevise@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:41.933337"], ["updated_at", "2016-01-15 01:31:41.933337"]]  (7.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:41.943640"], ["updated_at", "2016-01-15 01:31:41.943640"]]  (5.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:31:41.950563"], ["updated_at", "2016-01-15 01:31:41.951038"], ["id", 1]]  (6.8ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.4ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:31:41.963375"], ["updated_at", "2016-01-15 01:31:41.963375"]]  (7.1ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.1ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:41.983832"], ["current_sign_in_at", "2016-01-15 01:31:41.983832"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:41.984482"], ["id", 1]]  (7.2ms) commit transaction Redirected to http://test.example.com/ Completed 302 Found in 80ms (ActiveRecord: 44.8ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:41 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 2.9ms | ActiveRecord: 0.2ms)  (6.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.4ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>""}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 16ms (Views: 6.1ms | ActiveRecord: 0.9ms)  (5.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "rVzvfsT5zVqphQbBkYVX"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$wAC15qYrW8F69GaNkNDcOepXZZDPZ3YueqFnn0RTByglSJphIDCHW"], ["confirmed_at", "2016-01-15 01:31:42.172518"], ["authentication_token", "rVzvfsT5zVqphQbBkYVX"], ["created_at", "2016-01-15 01:31:42.174880"], ["updated_at", "2016-01-15 01:31:42.174880"]]  (6.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:42.205249"], ["current_sign_in_at", "2016-01-15 01:31:42.205249"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:42.205861"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.6ms | ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test18@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "bwtNGaLEeT6UwFsKMp57"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test18@example.com"], ["encrypted_password", "$2a$04$QDDoe6KjjOa6oqWoNgFJROJvLawpQi/aPK.A0LQJ.UxmnqEYUgBmu"], ["confirmed_at", "2016-01-15 01:31:42.386765"], ["authentication_token", "bwtNGaLEeT6UwFsKMp57"], ["created_at", "2016-01-15 01:31:42.389004"], ["updated_at", "2016-01-15 01:31:42.389004"]]  (7.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:42.399906"], ["updated_at", "2016-01-15 01:31:42.399906"]]  (8.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:42.411240"], ["updated_at", "2016-01-15 01:31:42.411240"]]  (6.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test18@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test18@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:42.441630"], ["current_sign_in_at", "2016-01-15 01:31:42.441630"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:42.442299"], ["id", 1]]  (6.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "HspZkr55KBr-GWfHRjra"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$ynIh5/2fpzXR3K0X8jqHZO5QjeJJF4N0k7iMUere68SN2UuCnTHeu"], ["confirmed_at", "2016-01-15 01:31:42.564851"], ["authentication_token", "HspZkr55KBr-GWfHRjra"], ["created_at", "2016-01-15 01:31:42.567139"], ["updated_at", "2016-01-15 01:31:42.567139"]]  (7.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:42.598684"], ["current_sign_in_at", "2016-01-15 01:31:42.598684"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:42.599289"], ["id", 1]]  (5.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.2ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms)  (5.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.2ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (9.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 12.2ms | ActiveRecord: 0.0ms)  (9.9ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:31:42 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test20@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "YAg3dLXY7ayFDfhYhHds"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test20@example.com"], ["encrypted_password", "$2a$04$XTKpfZvgzt1WXbR4PT0wKubpJjDMsiuIvw5tbjrSGhhS92Yu8AxMO"], ["confirmed_at", "2016-01-15 01:31:42.976518"], ["authentication_token", "YAg3dLXY7ayFDfhYhHds"], ["created_at", "2016-01-15 01:31:42.978734"], ["updated_at", "2016-01-15 01:31:42.978734"]]  (7.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:42.989806"], ["updated_at", "2016-01-15 01:31:42.989806"]]  (7.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:43.000131"], ["updated_at", "2016-01-15 01:31:43.000131"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test21@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "R4oacNbQ9sjT8w4Bb-9h"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test21@example.com"], ["encrypted_password", "$2a$04$znXafSuJE2dgEi3b3z77.Oqa8KDVn/VhQd.PWmdHBN794IsuZgl0."], ["confirmed_at", "2016-01-15 01:31:43.009022"], ["authentication_token", "R4oacNbQ9sjT8w4Bb-9h"], ["created_at", "2016-01-15 01:31:43.010909"], ["updated_at", "2016-01-15 01:31:43.010909"]]  (9.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 2], ["created_at", "2016-01-15 01:31:43.024438"], ["updated_at", "2016-01-15 01:31:43.024438"]]  (5.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:31:43.033058"], ["updated_at", "2016-01-15 01:31:43.033058"]]  (7.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:31:43.046664"], ["updated_at", "2016-01-15 01:31:43.046664"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:31:43.055447"], ["updated_at", "2016-01-15 01:31:43.055447"]]  (7.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:43 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:43 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test20@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test20@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:43.088700"], ["current_sign_in_at", "2016-01-15 01:31:43.088700"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:43.089431"], ["id", 1]]  (7.2ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.6ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:43 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'things';  (9.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "KiEvxZCbh6JA6jq3jzw4"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test23@example.com"], ["encrypted_password", "$2a$04$hsOqI01jF1F7fbUINViDF.mwjPyhmJTnH.RW2m4XutGvvY3bBcpQK"], ["confirmed_at", "2016-01-15 01:31:43.181336"], ["authentication_token", "KiEvxZCbh6JA6jq3jzw4"], ["created_at", "2016-01-15 01:31:43.183524"], ["updated_at", "2016-01-15 01:31:43.183524"]]  (5.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-15 01:31:43.193133"], ["updated_at", "2016-01-15 01:31:43.193133"]]  (7.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:31:43.203582"], ["updated_at", "2016-01-15 01:31:43.203582"]]  (5.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "RbsHba6Yt7Z7GktykmEv"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$/nMXMi2GOblTSZdbihHQCeUHzqlSKSe4rub5NBuvwomKcvYB7cglq"], ["confirmed_at", "2016-01-15 01:31:43.212285"], ["authentication_token", "RbsHba6Yt7Z7GktykmEv"], ["created_at", "2016-01-15 01:31:43.214244"], ["updated_at", "2016-01-15 01:31:43.214244"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 2], ["created_at", "2016-01-15 01:31:43.224939"], ["updated_at", "2016-01-15 01:31:43.224939"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:31:43.234762"], ["updated_at", "2016-01-15 01:31:43.234762"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:31:43.243255"], ["updated_at", "2016-01-15 01:31:43.243255"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:31:43.251439"], ["updated_at", "2016-01-15 01:31:43.251439"]]  (6.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:43 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:31:43 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test24@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test24@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:31:43.283803"], ["current_sign_in_at", "2016-01-15 01:31:43.283803"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:31:43.284656"], ["id", 2]]  (7.1ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 16ms (ActiveRecord: 7.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:31:43 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (9.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.3ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "UCyC2Pu3o5VYTsBFQfkd"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$qgUgVO/0Sxs3BOZIv0H5MOYHHA314gHDarqUFEgXOcR/9b6GJjbPG"], ["confirmed_at", "2016-01-15 01:33:12.650230"], ["authentication_token", "UCyC2Pu3o5VYTsBFQfkd"], ["created_at", "2016-01-15 01:33:12.667761"], ["updated_at", "2016-01-15 01:33:12.667761"]]  (6.2ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:12.684380"], ["updated_at", "2016-01-15 01:33:12.684380"]]  (7.3ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:12.714316"], ["updated_at", "2016-01-15 01:33:12.714316"]]  (7.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:12 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test1"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test1"]] Completed 401 Unauthorized in 16ms (ActiveRecord: 0.2ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:12 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test1"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test1"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (8.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (64.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.5ms) Completed 200 OK in 316ms (Views: 313.0ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test1"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test1"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test1"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test1@example.com"]] Completed 401 Unauthorized in 7ms (ActiveRecord: 0.5ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test1"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.0ms)  (9.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test2@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "E8LcC4rWhZedwtNkrXzY"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test2@example.com"], ["encrypted_password", "$2a$04$J6KVjYN4wUVc4WPgPUJWgOpMxbBvTU.tZrybDgXTTZqclTWafQ6ne"], ["confirmed_at", "2016-01-15 01:33:13.189767"], ["authentication_token", "E8LcC4rWhZedwtNkrXzY"], ["created_at", "2016-01-15 01:33:13.191874"], ["updated_at", "2016-01-15 01:33:13.191874"]]  (5.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:13.201442"], ["updated_at", "2016-01-15 01:33:13.201442"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:13.211146"], ["updated_at", "2016-01-15 01:33:13.211146"]]  (6.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test2"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test2"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test2"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test2"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test2"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test2"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test2"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test2"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.2ms | ActiveRecord: 0.0ms)  (5.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test3@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "emNx_nWmcfYHLe3qsKnS"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test3@example.com"], ["encrypted_password", "$2a$04$EqJ5ZjVk7HnSUW1wSpRnJewGhU6nSHvALCoc6xdI/UV/s/drwTvx6"], ["confirmed_at", "2016-01-15 01:33:13.330310"], ["authentication_token", "emNx_nWmcfYHLe3qsKnS"], ["created_at", "2016-01-15 01:33:13.332348"], ["updated_at", "2016-01-15 01:33:13.332348"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:13.343491"], ["updated_at", "2016-01-15 01:33:13.343491"]]  (5.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:13.351819"], ["updated_at", "2016-01-15 01:33:13.351819"]]  (8.5ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test3@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test3"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test3@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:13.393451"], ["current_sign_in_at", "2016-01-15 01:33:13.393451"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:13.394251"], ["id", 1]]  (7.2ms) commit transaction Redirected to http://test3.example.com/ Completed 302 Found in 21ms (ActiveRecord: 7.8ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test3"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test3"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 8.0ms | ActiveRecord: 0.3ms)  (5.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test4@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "GYeJ6-HTg1xzJFKJvCxT"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test4@example.com"], ["encrypted_password", "$2a$04$2IxBfI/8pIhlrJD.uBVmYuFTYaSdwrstA4aVBB5A7iemVCZTBT0oe"], ["confirmed_at", "2016-01-15 01:33:13.498701"], ["authentication_token", "GYeJ6-HTg1xzJFKJvCxT"], ["created_at", "2016-01-15 01:33:13.501074"], ["updated_at", "2016-01-15 01:33:13.501074"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:13.511901"], ["updated_at", "2016-01-15 01:33:13.511901"]]  (5.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:13.520179"], ["updated_at", "2016-01-15 01:33:13.520179"]]  (5.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test5@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Y9VfdxusjEJGH5MAMkFx"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test5@example.com"], ["encrypted_password", "$2a$04$UOU/.sZt5d9It5M2aZrt.OpQSswOjImjmGhw62fzw0xPq.0Am3Noa"], ["confirmed_at", "2016-01-15 01:33:13.528845"], ["authentication_token", "Y9VfdxusjEJGH5MAMkFx"], ["created_at", "2016-01-15 01:33:13.530654"], ["updated_at", "2016-01-15 01:33:13.530654"]]  (6.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 2], ["created_at", "2016-01-15 01:33:13.541069"], ["updated_at", "2016-01-15 01:33:13.541069"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:33:13.550742"], ["updated_at", "2016-01-15 01:33:13.550742"]]  (6.8ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.3ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test4"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test5@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test4"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test5@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test5@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test4"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.2ms | ActiveRecord: 0.0ms)  (6.1ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.0ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test6@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "mbdGk3bhP6ARB7QmMgx8"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test6@example.com"], ["encrypted_password", "$2a$04$T/UqZJYCpD56DbcbtFIG..y5aqJhxGzTFuryY8WNJxcRRo5h4l9JC"], ["confirmed_at", "2016-01-15 01:33:13.717397"], ["authentication_token", "mbdGk3bhP6ARB7QmMgx8"], ["created_at", "2016-01-15 01:33:13.719522"], ["updated_at", "2016-01-15 01:33:13.719522"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:13.729134"], ["updated_at", "2016-01-15 01:33:13.729134"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:13.738867"], ["updated_at", "2016-01-15 01:33:13.738867"]]  (6.6ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test7@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "7wAk9s-1iS9qGhzfypnP"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test7@example.com"], ["encrypted_password", "$2a$04$SjrDVmed9GtdYAzkLKx7y.7E8HQm0UcxPjW2dLpDdmS/tqmFLoerq"], ["confirmed_at", "2016-01-15 01:33:13.748470"], ["authentication_token", "7wAk9s-1iS9qGhzfypnP"], ["created_at", "2016-01-15 01:33:13.750238"], ["updated_at", "2016-01-15 01:33:13.750238"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 2], ["created_at", "2016-01-15 01:33:13.760656"], ["updated_at", "2016-01-15 01:33:13.760656"]]  (5.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:33:13.768740"], ["updated_at", "2016-01-15 01:33:13.768740"]]  (7.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:33:13.782154"], ["updated_at", "2016-01-15 01:33:13.782154"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:33:13.791009"], ["updated_at", "2016-01-15 01:33:13.791009"]]  (9.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test7@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test7@example.com"]]  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:13.826472"], ["current_sign_in_at", "2016-01-15 01:33:13.826472"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:13.827102"], ["id", 2]]  (5.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 6.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 2]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 13ms (Views: 9.8ms | ActiveRecord: 0.3ms) Started GET "/things" for 127.0.0.1 at 2016-01-15 01:33:13 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test7"]] Processing by ThingsController#index as HTML Thing Load (0.2ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 2]] Rendered things/index.html.erb within layouts/application (1.0ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.2ms)  (9.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test9@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "rGeYTXPw6zjFV68dERn3"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test9@example.com"], ["encrypted_password", "$2a$04$KzTl7dfTObEoUhQ74XOoz.rp0BjF8b2B.2l5Kv6m67kGigtfXqCl6"], ["confirmed_at", "2016-01-15 01:33:13.944865"], ["authentication_token", "rGeYTXPw6zjFV68dERn3"], ["created_at", "2016-01-15 01:33:13.946919"], ["updated_at", "2016-01-15 01:33:13.946919"]]  (7.2ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:13.957796"], ["updated_at", "2016-01-15 01:33:13.957796"]]  (6.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:13.967304"], ["updated_at", "2016-01-15 01:33:13.967304"]]  (9.6ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test10@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "s398FPnTZ36uMwJK6cAR"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test10@example.com"], ["encrypted_password", "$2a$04$aZ7CTLxo/l4kNZhEfjJpbO5nBnaqz.o0g/I6TfnUa891FHxWqmESq"], ["confirmed_at", "2016-01-15 01:33:13.979804"], ["authentication_token", "s398FPnTZ36uMwJK6cAR"], ["created_at", "2016-01-15 01:33:13.981645"], ["updated_at", "2016-01-15 01:33:13.981645"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 2], ["created_at", "2016-01-15 01:33:13.992551"], ["updated_at", "2016-01-15 01:33:13.992551"]]  (7.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:33:14.002772"], ["updated_at", "2016-01-15 01:33:14.002772"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:33:14.011408"], ["updated_at", "2016-01-15 01:33:14.011408"]]  (6.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:33:14.019465"], ["updated_at", "2016-01-15 01:33:14.019465"]]  (6.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test9@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:14.051524"], ["current_sign_in_at", "2016-01-15 01:33:14.051524"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:14.052192"], ["id", 1]]  (7.1ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test8"]] Processing by ThingsController#index as HTML Thing Load (0.1ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 1]] Rendered things/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (6.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test12@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "bfQXp8rG9yPpdQ-vxP2E"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test12@example.com"], ["encrypted_password", "$2a$04$IzfzqOXHU8TuO5D/wKcydeoyRi7ZNimuWucmFtFP2Xy9alYywqAQ6"], ["confirmed_at", "2016-01-15 01:33:14.194112"], ["authentication_token", "bfQXp8rG9yPpdQ-vxP2E"], ["created_at", "2016-01-15 01:33:14.196397"], ["updated_at", "2016-01-15 01:33:14.196397"]]  (10.0ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:14.210302"], ["updated_at", "2016-01-15 01:33:14.210302"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:14.219856"], ["updated_at", "2016-01-15 01:33:14.219856"]]  (5.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test12@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test12@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:14.250500"], ["current_sign_in_at", "2016-01-15 01:33:14.250500"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:14.251075"], ["id", 1]]  (6.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["created_at", "2016-01-15 01:33:14.293389"], ["updated_at", "2016-01-15 01:33:14.293389"]]  (7.8ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 1], ["created_at", "2016-01-15 01:33:14.305877"], ["updated_at", "2016-01-15 01:33:14.305877"]]  (8.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 2 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 2) LIMIT 1 SQL (0.2ms) UPDATE "mtdevise_accounts" SET "owner_id" = ?, "updated_at" = ? WHERE "mtdevise_accounts"."id" = ? [["owner_id", 1], ["updated_at", "2016-01-15 01:33:14.318187"], ["id", 2]]  (6.6ms) commit transaction Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 2], ["created_at", "2016-01-15 01:33:14.336472"], ["updated_at", "2016-01-15 01:33:14.336472"]]  (7.5ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (5.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 76ms (ActiveRecord: 39.9ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms)  (7.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "VSxxt57xjVMSgrsgtpwx"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test14@example.com"], ["encrypted_password", "$2a$04$O4VKKa9HUtAhi4ReXSHE9ex1KWwzyTREzJHD.ETHZnnzl7LEDONgO"], ["confirmed_at", "2016-01-15 01:33:14.449477"], ["authentication_token", "VSxxt57xjVMSgrsgtpwx"], ["created_at", "2016-01-15 01:33:14.451485"], ["updated_at", "2016-01-15 01:33:14.451485"]]  (5.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:14.461261"], ["updated_at", "2016-01-15 01:33:14.461261"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:14.470920"], ["updated_at", "2016-01-15 01:33:14.470920"]]  (6.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test14@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test14@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:14.502516"], ["current_sign_in_at", "2016-01-15 01:33:14.502516"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:14.503168"], ["id", 1]]  (5.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 6.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 49ms (Views: 47.7ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"test11"}, "commit"=>"Create Account"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 4.9ms | ActiveRecord: 0.9ms)  (6.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test16@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "xeyX869To38zCh6cXtos"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test16@example.com"], ["encrypted_password", "$2a$04$UMv.mxUndaxZrEwjhCPEXecApnfqdA9Pre1Vybx96Zf8.KWLLVeqe"], ["confirmed_at", "2016-01-15 01:33:14.665956"], ["authentication_token", "xeyX869To38zCh6cXtos"], ["created_at", "2016-01-15 01:33:14.668023"], ["updated_at", "2016-01-15 01:33:14.668023"]]  (5.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:14.677688"], ["updated_at", "2016-01-15 01:33:14.677688"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:14.687328"], ["updated_at", "2016-01-15 01:33:14.687328"]]  (9.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test16@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test16@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:14.722275"], ["current_sign_in_at", "2016-01-15 01:33:14.722275"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:14.722923"], ["id", 1]]  (7.4ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.7ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>""}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 4.7ms | ActiveRecord: 0.8ms)  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test18@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "kJRxTJssSA1xJsEi7r3x"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test18@example.com"], ["encrypted_password", "$2a$04$2w6/H/dZ9iHZM1yRw6LuhOQRN.gU49Roe7PkkItt1txpJbdn8P1.a"], ["confirmed_at", "2016-01-15 01:33:14.841993"], ["authentication_token", "kJRxTJssSA1xJsEi7r3x"], ["created_at", "2016-01-15 01:33:14.843969"], ["updated_at", "2016-01-15 01:33:14.843969"]]  (5.9ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:14.853536"], ["updated_at", "2016-01-15 01:33:14.853536"]]  (6.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:14.863038"], ["updated_at", "2016-01-15 01:33:14.863038"]]  (6.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test18@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test18@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:14.894404"], ["current_sign_in_at", "2016-01-15 01:33:14.894404"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:14.895123"], ["id", 1]]  (8.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 17ms (ActiveRecord: 9.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.1ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:14 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "subdomain"=>"admin"}, "commit"=>"Create Account"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]]  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (2.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 4.4ms | ActiveRecord: 0.8ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test20@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "ypEx7yU3qbggLYJYyFLQ"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test20@example.com"], ["encrypted_password", "$2a$04$MebA/6d7ueSnZKPxOptYRuB5fTDPGiKhTMOwwaf8manBP2yj1ebz2"], ["confirmed_at", "2016-01-15 01:33:15.054376"], ["authentication_token", "ypEx7yU3qbggLYJYyFLQ"], ["created_at", "2016-01-15 01:33:15.056621"], ["updated_at", "2016-01-15 01:33:15.056621"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:15.067259"], ["updated_at", "2016-01-15 01:33:15.067259"]]  (7.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:15.076900"], ["updated_at", "2016-01-15 01:33:15.076900"]]  (6.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:15 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.2ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:15 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test20@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test20@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.1ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test20@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.4ms | ActiveRecord: 0.0ms)  (8.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test21@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "vR4MFxHG-7Y2mWtVp1Pp"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test21@example.com"], ["encrypted_password", "$2a$04$LmSDLHqiX2dOOp83M3wnRu5tACWa3NH8.FnOiVCHM5HOumnHUW3Hi"], ["confirmed_at", "2016-01-15 01:33:15.189082"], ["authentication_token", "vR4MFxHG-7Y2mWtVp1Pp"], ["created_at", "2016-01-15 01:33:15.191193"], ["updated_at", "2016-01-15 01:33:15.191193"]]  (7.0ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:15.201960"], ["updated_at", "2016-01-15 01:33:15.201960"]]  (8.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:15.213124"], ["updated_at", "2016-01-15 01:33:15.213124"]]  (6.6ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:15 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:15 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test21@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test21@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:15.243781"], ["current_sign_in_at", "2016-01-15 01:33:15.243781"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:15.244457"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:15 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.2ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.2ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.3ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "xYyP5z3sXFGNPpHJy777"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "d3f1c0e08323cb80b30c83436472294eebed1ef2e55e45b3253d12773929dbaf"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$1dj8Zbxs3JITZWdCXR.TgOCi1cBVNOObzU88DzrIJVSMQkZaF1U6i"], ["authentication_token", "xYyP5z3sXFGNPpHJy777"], ["created_at", "2016-01-15 01:33:15.393888"], ["updated_at", "2016-01-15 01:33:15.393888"], ["confirmation_token", "xpeoYW8sa7dYNCnT5bWF"], ["confirmation_sent_at", "2016-01-15 01:33:15.580925"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (4.6ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 149.6ms Sent mail to bb@gmail.com (9.9ms) Date: Fri, 15 Jan 2016 01:33:15 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984c5bb64a9_2a8ac7330312fc@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:15.750857"], ["updated_at", "2016-01-15 01:33:15.750857"]]  (8.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:15.762343"], ["updated_at", "2016-01-15 01:33:15.762343"]]  (6.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:33:15.770268"], ["updated_at", "2016-01-15 01:33:15.770729"], ["id", 1]]  (6.5ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:33:15.782426"], ["updated_at", "2016-01-15 01:33:15.782426"]]  (6.8ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (6.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:15.802064"], ["current_sign_in_at", "2016-01-15 01:33:15.802064"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:15.802597"], ["id", 1]]  (6.5ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 427ms (ActiveRecord: 44.5ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (9.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "SwVgTZKiABsYyouJ7UjS"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "dfa6ff7fce4cc50498cf2273d60ea0cc196e8e716536da6e9fcfcfad42221448"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$B325j/wnE4cKw2uwHccG6e652IQZA3eaD4s0vXjX6poIKpDZmVGE."], ["authentication_token", "SwVgTZKiABsYyouJ7UjS"], ["created_at", "2016-01-15 01:33:15.958449"], ["updated_at", "2016-01-15 01:33:15.958449"], ["confirmation_token", "8fon11M3vSz6GMy1Eery"], ["confirmation_sent_at", "2016-01-15 01:33:15.959204"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.2ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.7ms Sent mail to bb@gmail.com (2.8ms) Date: Fri, 15 Jan 2016 01:33:15 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984c5bec07e_2a8ac733031320@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:15.968422"], ["updated_at", "2016-01-15 01:33:15.968422"]]  (7.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:15.978756"], ["updated_at", "2016-01-15 01:33:15.978756"]]  (6.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:33:15.986410"], ["updated_at", "2016-01-15 01:33:15.986810"], ["id", 1]]  (6.5ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:33:15.998017"], ["updated_at", "2016-01-15 01:33:15.998017"]]  (6.8ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:16.017953"], ["current_sign_in_at", "2016-01-15 01:33:16.017953"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:16.018525"], ["id", 1]]  (9.2ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 82ms (ActiveRecord: 46.8ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "yLRwi3sAqR7RTy9dihnh"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "8a8f7cbbf03f0d1b9f58a4e0b8e23d3a1d667f0ad2bdc042a3c0e5c44e398b04"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$CHlnXgErj/y84aFgvEnn5.bqVHrD.cQbqNI1taA8SatJ8QIcIyNjm"], ["authentication_token", "yLRwi3sAqR7RTy9dihnh"], ["created_at", "2016-01-15 01:33:16.158993"], ["updated_at", "2016-01-15 01:33:16.158993"], ["confirmation_token", "bpoi-VfGcuhSHiqv8YLx"], ["confirmation_sent_at", "2016-01-15 01:33:16.159712"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.7ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.9ms Sent mail to user@example.com (2.7ms) Date: Fri, 15 Jan 2016 01:33:16 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <56984c5c28de4_2a8ac7330314aa@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:16.169070"], ["updated_at", "2016-01-15 01:33:16.169070"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:16.178912"], ["updated_at", "2016-01-15 01:33:16.178912"]]  (6.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:33:16.186922"], ["updated_at", "2016-01-15 01:33:16.187405"], ["id", 1]]  (6.0ms) commit transaction Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (6.3ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "zSikw6noPxUusvvqAxkp"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$CVRtnut.mEmI2ku62ZdQJejivJk1x8l6.uTYLgv4TxVohqY1Ivo7S"], ["confirmed_at", "2016-01-15 01:33:16.305521"], ["authentication_token", "zSikw6noPxUusvvqAxkp"], ["created_at", "2016-01-15 01:33:16.307418"], ["updated_at", "2016-01-15 01:33:16.307418"]]  (6.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.5ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:16.339048"], ["current_sign_in_at", "2016-01-15 01:33:16.339048"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:16.339773"], ["id", 1]]  (5.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 6.2ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_if_coming_form_sign_up rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms)  (7.4ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (1.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 8ms (Views: 6.7ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>""}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = '' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 17ms (Views: 5.8ms | ActiveRecord: 1.0ms)  (6.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "meHdyWPxr1byosGnJscc"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "47f042686727a31d3828ac236b65b2ce87254e62ab982064d5d1864ac8300e63"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "mtdevise@example.com"], ["encrypted_password", "$2a$04$hmdjarksnRAyf7XQlAfD3OT2rJaVftPJR4HlLNaGpkb26RA1e4zqK"], ["authentication_token", "meHdyWPxr1byosGnJscc"], ["created_at", "2016-01-15 01:33:16.570543"], ["updated_at", "2016-01-15 01:33:16.570543"], ["confirmation_token", "q4sfkBZ7ypfgfqXxP-ef"], ["confirmation_sent_at", "2016-01-15 01:33:16.571315"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.4ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.8ms Sent mail to mtdevise@example.com (2.9ms) Date: Fri, 15 Jan 2016 01:33:16 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: mtdevise@example.com Message-ID: <56984c5c8d5ec_2a8ac733031558@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome mtdevise@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:16.580746"], ["updated_at", "2016-01-15 01:33:16.580746"]]  (7.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:16.591360"], ["updated_at", "2016-01-15 01:33:16.591360"]]  (6.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:33:16.599199"], ["updated_at", "2016-01-15 01:33:16.599628"], ["id", 1]]  (5.4ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'test' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:33:16.609968"], ["updated_at", "2016-01-15 01:33:16.609968"]]  (6.9ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (6.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:16.629203"], ["current_sign_in_at", "2016-01-15 01:33:16.629203"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:16.629812"], ["id", 1]]  (6.5ms) commit transaction Redirected to http://test.example.com/ Completed 302 Found in 76ms (ActiveRecord: 42.5ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 3.1ms | ActiveRecord: 0.2ms)  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-15 01:33:16.723088"], ["updated_at", "2016-01-15 01:33:16.723088"]]  (7.1ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"test"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (1.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (5.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 19ms (Views: 7.6ms | ActiveRecord: 1.0ms)  (5.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"Test", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"mtdevise@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"admin"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.0ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'mtdevise@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'admin' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 15ms (Views: 5.6ms | ActiveRecord: 0.9ms)  (5.9ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "zdTRm9pZDJKzfhENeXxZ"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test23@example.com"], ["encrypted_password", "$2a$04$K27gxc0afgFEj8Am2xusierodCzjDBGGNte9zeAdl7gy2lYphxPOi"], ["confirmed_at", "2016-01-15 01:33:16.925468"], ["authentication_token", "zdTRm9pZDJKzfhENeXxZ"], ["created_at", "2016-01-15 01:33:16.927425"], ["updated_at", "2016-01-15 01:33:16.927425"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:16.936984"], ["updated_at", "2016-01-15 01:33:16.936984"]]  (6.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:16.946256"], ["updated_at", "2016-01-15 01:33:16.946256"]]  (9.5ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started POST "/accounts" for 127.0.0.1 at 2016-01-15 01:33:16 +0000 Processing by Mtdevise::AccountsController#create as HTML Parameters: {"utf8"=>"✓", "account"=>{"name"=>"another name", "firstname"=>"Test", "lastname"=>"Test", "username"=>"Test", "owner_attributes"=>{"email"=>"test23@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "subdomain"=>"anothersubdomain"}, "commit"=>"Create Account"}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) rollback transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test23@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'anothersubdomain' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'another name' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.0ms) Completed 200 OK in 16ms (Views: 5.6ms | ActiveRecord: 1.0ms)  (6.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (8.6ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.0ms)  (7.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "6wgd-qs2cazV9A9zUdFi"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$y3NeI7/k5uLbt6G.a31h/eDwmI7Z/Ru29EymI.iNdOerSN633nrJa"], ["confirmed_at", "2016-01-15 01:33:17.186217"], ["authentication_token", "6wgd-qs2cazV9A9zUdFi"], ["created_at", "2016-01-15 01:33:17.188353"], ["updated_at", "2016-01-15 01:33:17.188353"]]  (5.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 1], ["created_at", "2016-01-15 01:33:17.197775"], ["updated_at", "2016-01-15 01:33:17.197775"]]  (7.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:33:17.207448"], ["updated_at", "2016-01-15 01:33:17.207448"]]  (7.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.8ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test24@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test24@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:17.237834"], ["current_sign_in_at", "2016-01-15 01:33:17.237834"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:17.238476"], ["id", 1]]  (6.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.2ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms)  (5.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.4ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (7.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "xR5Kgq5P3PKT6YMzrRoF"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$qkVj7wHyJu5OHjsRu5kGVejj953GIqlwZbznWQG0nkjHPtKNd4J9m"], ["confirmed_at", "2016-01-15 01:33:17.374697"], ["authentication_token", "xR5Kgq5P3PKT6YMzrRoF"], ["created_at", "2016-01-15 01:33:17.376775"], ["updated_at", "2016-01-15 01:33:17.376775"]]  (7.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:33:17.407410"], ["current_sign_in_at", "2016-01-15 01:33:17.407410"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:33:17.408027"], ["id", 1]]  (5.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.0ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::WelcomeController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_logged_in_users_to_account_page rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (1.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms)  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::AccountsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/users/_form.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/new.html.erb within layouts/mtdevise/accounts (3.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.0ms)  (6.7ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 2ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms)  (9.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.5ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:33:17 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 9.7ms | ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.1ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (7.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test1@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Mcy3uY-SwVJ5ijBy23HW"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test1@example.com"], ["encrypted_password", "$2a$04$TsREHTZKs.va0qjMkHC/6ul54uAT/yewG9ZKYk.zhjDiTibiIHZiu"], ["confirmed_at", "2016-01-15 01:37:29.670456"], ["authentication_token", "Mcy3uY-SwVJ5ijBy23HW"], ["created_at", "2016-01-15 01:37:29.689591"], ["updated_at", "2016-01-15 01:37:29.689591"]]  (7.3ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test1' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #1' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test1' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #1"], ["firstname", "Test1"], ["lastname", "Test1"], ["username", "test1"], ["subdomain", "test1"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:29.707456"], ["updated_at", "2016-01-15 01:37:29.707456"]]  (5.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:29.737664"], ["updated_at", "2016-01-15 01:37:29.737664"]]  (7.2ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:29 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (9.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (67.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.5ms) Completed 200 OK in 281ms (Views: 267.1ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test1@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test1@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:30.127756"], ["current_sign_in_at", "2016-01-15 01:37:30.127756"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:30.128663"], ["id", 1]]  (9.1ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 32ms (ActiveRecord: 9.6ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (6.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 15ms (Views: 11.6ms | ActiveRecord: 0.4ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 11ms (ActiveRecord: 0.1ms)  (7.1ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test3@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "yTefy9RtxsDveGtBq_MY"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test3@example.com"], ["encrypted_password", "$2a$04$Hg7ph.9/FagSJMdmIqZm9uAKoqVtxRPYZAYXPuq3DTRw5fM7/hb9m"], ["confirmed_at", "2016-01-15 01:37:30.256490"], ["authentication_token", "yTefy9RtxsDveGtBq_MY"], ["created_at", "2016-01-15 01:37:30.258755"], ["updated_at", "2016-01-15 01:37:30.258755"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test2' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #2' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test2' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #2"], ["firstname", "Test2"], ["lastname", "Test2"], ["username", "test2"], ["subdomain", "test2"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:30.269560"], ["updated_at", "2016-01-15 01:37:30.269560"]]  (6.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:30.279158"], ["updated_at", "2016-01-15 01:37:30.279158"]]  (6.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.5ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test3@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test3@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:30.311877"], ["current_sign_in_at", "2016-01-15 01:37:30.311877"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:30.312670"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test5@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "fszbm6EwyAPu2hTADXxi"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test5@example.com"], ["encrypted_password", "$2a$04$wWYRgrTxjeaig/qxRRdQnepqiJtn6mW2Sc9pBwXvSp/b1OE9QAaIG"], ["confirmed_at", "2016-01-15 01:37:30.400851"], ["authentication_token", "fszbm6EwyAPu2hTADXxi"], ["created_at", "2016-01-15 01:37:30.403084"], ["updated_at", "2016-01-15 01:37:30.403084"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test3' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #3' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test3' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #3"], ["firstname", "Test3"], ["lastname", "Test3"], ["username", "test3"], ["subdomain", "test3"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:30.413963"], ["updated_at", "2016-01-15 01:37:30.413963"]]  (6.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:30.423116"], ["updated_at", "2016-01-15 01:37:30.423116"]]  (6.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test5@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test5@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:30.454524"], ["current_sign_in_at", "2016-01-15 01:37:30.454524"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:30.455222"], ["id", 1]]  (5.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 6.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test7@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "GSVNs_QTrpZhCufKw2GT"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test7@example.com"], ["encrypted_password", "$2a$04$kwpTR/o5c5fvn20ZNuqTnOmu5bXPHXmnro9KCR7Vk3GpdeMj/vGOm"], ["confirmed_at", "2016-01-15 01:37:30.544426"], ["authentication_token", "GSVNs_QTrpZhCufKw2GT"], ["created_at", "2016-01-15 01:37:30.546470"], ["updated_at", "2016-01-15 01:37:30.546470"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test4' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #4' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test4' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #4"], ["firstname", "Test4"], ["lastname", "Test4"], ["username", "test4"], ["subdomain", "test4"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:30.557235"], ["updated_at", "2016-01-15 01:37:30.557235"]]  (6.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:30.566586"], ["updated_at", "2016-01-15 01:37:30.566586"]]  (6.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test7@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test7@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:30.597654"], ["current_sign_in_at", "2016-01-15 01:37:30.597654"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:30.598296"], ["id", 1]]  (6.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.2ms) Started GET "/accounts/new" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (5.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (5.2ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (9.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.4ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#index as HTML Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms)  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.0ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test9@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "bqUfEizBT9vz1JjfPECo"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test9@example.com"], ["encrypted_password", "$2a$04$AavBOsjOwrs7XL2SHmoSpe8IUBYTSA6nKKLqEFnaQa1zY0NqOrNSC"], ["confirmed_at", "2016-01-15 01:37:30.894043"], ["authentication_token", "bqUfEizBT9vz1JjfPECo"], ["created_at", "2016-01-15 01:37:30.896268"], ["updated_at", "2016-01-15 01:37:30.896268"]]  (6.0ms) commit transaction  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test5' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #5' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test5' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #5"], ["firstname", "Test5"], ["lastname", "Test5"], ["username", "test5"], ["subdomain", "test5"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:30.906178"], ["updated_at", "2016-01-15 01:37:30.906178"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:30.915798"], ["updated_at", "2016-01-15 01:37:30.915798"]]  (5.5ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (8.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test9@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test9@example.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:30.947257"], ["current_sign_in_at", "2016-01-15 01:37:30.947257"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:30.947932"], ["id", 1]]  (5.6ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 13ms (ActiveRecord: 6.0ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:30 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.2ms)  (6.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (9.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test11@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Z747Sz1pMWC3y9ssEBUD"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test11@example.com"], ["encrypted_password", "$2a$04$LOFM8Hzl6dj.9CFTC/GSauiCpDBTKLi3JCXTogyKse2rS9wLVRAay"], ["confirmed_at", "2016-01-15 01:37:31.080898"], ["authentication_token", "Z747Sz1pMWC3y9ssEBUD"], ["created_at", "2016-01-15 01:37:31.083174"], ["updated_at", "2016-01-15 01:37:31.083174"]]  (7.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test6' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #6' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test6' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #6"], ["firstname", "Test6"], ["lastname", "Test6"], ["username", "test6"], ["subdomain", "test6"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:31.094284"], ["updated_at", "2016-01-15 01:37:31.094284"]]  (6.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:31.103822"], ["updated_at", "2016-01-15 01:37:31.103822"]]  (5.4ms) commit transaction  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test12@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "3WnBPDPpmzRZjcXWe6Lj"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test12@example.com"], ["encrypted_password", "$2a$04$/24uSmL0cJmNZ8r9gKqxI.5zv8DGVJWLF38I0KhE4nzAV3fHAT/B."], ["confirmed_at", "2016-01-15 01:37:31.112377"], ["authentication_token", "3WnBPDPpmzRZjcXWe6Lj"], ["created_at", "2016-01-15 01:37:31.114244"], ["updated_at", "2016-01-15 01:37:31.114244"]]  (7.3ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test7' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #7' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test7' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #7"], ["firstname", "Test7"], ["lastname", "Test7"], ["username", "test7"], ["subdomain", "test7"], ["owner_id", 2], ["created_at", "2016-01-15 01:37:31.125273"], ["updated_at", "2016-01-15 01:37:31.125273"]]  (8.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:37:31.136809"], ["updated_at", "2016-01-15 01:37:31.136809"]]  (6.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.2ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test6"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test12@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test6"]] Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test12@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.6ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test12@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test6"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.7ms | ActiveRecord: 0.0ms)  (5.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test13@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "CzCv5XfUwyHuS_rv39A5"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test13@example.com"], ["encrypted_password", "$2a$04$wsIHcRSRekhiiJMwIYwxNONxBOs0/wMAeibuQNoy62ceOv42DcCaC"], ["confirmed_at", "2016-01-15 01:37:31.268295"], ["authentication_token", "CzCv5XfUwyHuS_rv39A5"], ["created_at", "2016-01-15 01:37:31.270602"], ["updated_at", "2016-01-15 01:37:31.270602"]]  (6.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test8' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #8' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test8' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #8"], ["firstname", "Test8"], ["lastname", "Test8"], ["username", "test8"], ["subdomain", "test8"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:31.281247"], ["updated_at", "2016-01-15 01:37:31.281247"]]  (6.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:31.290618"], ["updated_at", "2016-01-15 01:37:31.290618"]]  (6.7ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test8"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test8"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test8"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test8"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test8"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test13@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test8"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test8"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test13@example.com"]] Completed 401 Unauthorized in 4ms (ActiveRecord: 0.3ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test13@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test8"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.2ms | ActiveRecord: 0.0ms)  (7.1ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test14@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "yURMcsU8DBaKbgLHLSdY"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test14@example.com"], ["encrypted_password", "$2a$04$M.3T0fEogx60WxNUDWR6BenYS3oCr73B/CNa7xhSz9xrKtvExofyO"], ["confirmed_at", "2016-01-15 01:37:31.413990"], ["authentication_token", "yURMcsU8DBaKbgLHLSdY"], ["created_at", "2016-01-15 01:37:31.416160"], ["updated_at", "2016-01-15 01:37:31.416160"]]  (5.7ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test9' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #9' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test9' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #9"], ["firstname", "Test9"], ["lastname", "Test9"], ["username", "test9"], ["subdomain", "test9"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:31.425681"], ["updated_at", "2016-01-15 01:37:31.425681"]]  (7.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:31.435578"], ["updated_at", "2016-01-15 01:37:31.435578"]]  (7.0ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test9"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test9"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test9"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test9"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.5ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test9"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test9"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test9"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "foo@example.com"]] Completed 401 Unauthorized in 2ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"foo@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} CACHE (0.0ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test9"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (6.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.0ms | ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.8ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test15@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "vCD8C_zx-9rfPh6zeB2w"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test15@example.com"], ["encrypted_password", "$2a$04$7eqCm/WX8At06PbEC.fnlel0QGLoRGj0XFAtc/FzgeDkIvocI2rX."], ["confirmed_at", "2016-01-15 01:37:31.554700"], ["authentication_token", "vCD8C_zx-9rfPh6zeB2w"], ["created_at", "2016-01-15 01:37:31.556969"], ["updated_at", "2016-01-15 01:37:31.556969"]]  (8.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test10' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #10' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test10' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #10"], ["firstname", "Test10"], ["lastname", "Test10"], ["username", "test10"], ["subdomain", "test10"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:31.569729"], ["updated_at", "2016-01-15 01:37:31.569729"]]  (6.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:31.579091"], ["updated_at", "2016-01-15 01:37:31.579091"]]  (6.4ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test10"]] Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by Devise::SessionsController#new as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test10"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.4ms | ActiveRecord: 0.1ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test15@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test10"]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? LIMIT 1 [["subdomain", "test10"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? AND "mtdevise_users"."email" = ? LIMIT 1 [["account_id", 1], ["email", "test15@example.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:31.616631"], ["current_sign_in_at", "2016-01-15 01:37:31.616631"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:31.617279"], ["id", 1]]  (7.1ms) commit transaction Redirected to http://test10.example.com/ Completed 302 Found in 14ms (ActiveRecord: 7.5ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:31 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test10"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "test10"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/account/dashboard/index.html.erb within layouts/mtdevise/dashboard (0.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_header.html.erb (0.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 9ms (Views: 7.1ms | ActiveRecord: 0.2ms)  (6.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (8.5ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.1ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.2ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.3ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "apzyYpDiGPMKysPoNjxN"]] Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "2c041a212675314defc72934e225bb905067a70cef40f59f722c18cb03e5624a"]] SQL (0.3ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$ZNt2OJJfAWyhz5OYRy5AQu..AC9TaBOn.kocIXdAottsSV0IgqRK6"], ["authentication_token", "apzyYpDiGPMKysPoNjxN"], ["created_at", "2016-01-15 01:37:31.809152"], ["updated_at", "2016-01-15 01:37:31.809152"], ["confirmation_token", "DsW6uXSED_yx1NqhEoNX"], ["confirmation_sent_at", "2016-01-15 01:37:31.991788"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (5.1ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 136.7ms Sent mail to bb@gmail.com (9.6ms) Date: Fri, 15 Jan 2016 01:37:32 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984d5c23703_2e8b1f32832951@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:32.149424"], ["updated_at", "2016-01-15 01:37:32.149424"]]  (8.3ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:32.160921"], ["updated_at", "2016-01-15 01:37:32.160921"]]  (6.8ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:37:32.168886"], ["updated_at", "2016-01-15 01:37:32.169410"], ["id", 1]]  (8.9ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:37:32.193647"], ["updated_at", "2016-01-15 01:37:32.193647"]]  (7.2ms) commit transaction Mtdevise::Role Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.2ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.2ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:32.221258"], ["current_sign_in_at", "2016-01-15 01:37:32.221258"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:32.221841"], ["id", 1]]  (6.6ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 431ms (ActiveRecord: 48.9ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.3ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (5.3ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Processing by Mtdevise::AccountsController#create as HTML Parameters: {"account"=>{"name"=>"something", "firstname"=>"something", "lastname"=>"something", "username"=>"something", "subdomain"=>"something", "owner_attributes"=>{"email"=>"bb@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'bb@gmail.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'something' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'something' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "SGZ2KLQ53vGJj88xuY_e"]] Mtdevise::User Load (0.0ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "28676b8f215749bc7c4c6cefec53037e855a694bbbaa365d03d97b5fae788b54"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "bb@gmail.com"], ["encrypted_password", "$2a$04$5TBZzQBOicdqWhKX42guZ.7O9XbociP7ZvsRftVnOBeKGLODmHRji"], ["authentication_token", "SGZ2KLQ53vGJj88xuY_e"], ["created_at", "2016-01-15 01:37:32.318896"], ["updated_at", "2016-01-15 01:37:32.318896"], ["confirmation_token", "Srod__6Qs-jqJkP2nPSH"], ["confirmation_sent_at", "2016-01-15 01:37:32.319658"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.1ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 4.4ms Sent mail to bb@gmail.com (2.7ms) Date: Fri, 15 Jan 2016 01:37:32 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: bb@gmail.com Message-ID: <56984d5c4fd35_2e8b1f3283306@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome bb@gmail.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "something"], ["firstname", "something"], ["lastname", "something"], ["username", "something"], ["subdomain", "something"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:32.328627"], ["updated_at", "2016-01-15 01:37:32.328627"]]  (7.5ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:32.338888"], ["updated_at", "2016-01-15 01:37:32.338888"]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:37:32.347016"], ["updated_at", "2016-01-15 01:37:32.347428"], ["id", 1]]  (5.4ms) commit transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."subdomain" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'something' AND "mtdevise_accounts"."id" != 1 AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."username" = 'something' AND "mtdevise_accounts"."id" != 1) LIMIT 1 Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."name" = ? AND "mtdevise_roles"."resource_type" = ? AND "mtdevise_roles"."resource_id" = ? ORDER BY "mtdevise_roles"."id" ASC LIMIT 1 [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_roles" ("name", "resource_type", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "admin"], ["resource_type", "Mtdevise::Account"], ["resource_id", 1], ["created_at", "2016-01-15 01:37:32.357615"], ["updated_at", "2016-01-15 01:37:32.357615"]]  (6.9ms) commit transaction Mtdevise::Role Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND "mtdevise_roles"."id" = ? LIMIT 1 [["user_id", 1], ["id", 1]]  (0.1ms) SELECT "mtdevise_roles".id FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" WHERE "mtdevise_roles"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? [["user_id", 1]]  (0.0ms) begin transaction SQL (0.1ms) INSERT INTO "mtdevise_users_mtdevise_roles" ("user_id", "role_id") VALUES (?, ?) [["user_id", 1], ["role_id", 1]]  (7.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:32.377252"], ["current_sign_in_at", "2016-01-15 01:37:32.377252"], ["last_sign_in_ip", "0.0.0.0"], ["current_sign_in_ip", "0.0.0.0"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:32.377769"], ["id", 1]]  (8.5ms) commit transaction Redirected to http://something.test.host/ Completed 302 Found in 79ms (ActiveRecord: 45.0ms) Mtdevise::Account Load (0.2ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? LIMIT 1 [["id", 1]] Mtdevise::Role Load (0.1ms) SELECT "mtdevise_roles".* FROM "mtdevise_roles" INNER JOIN "mtdevise_users_mtdevise_roles" ON "mtdevise_roles"."id" = "mtdevise_users_mtdevise_roles"."role_id" WHERE "mtdevise_users_mtdevise_roles"."user_id" = ? AND ((((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type IS NULL) AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id IS NULL)) OR ((mtdevise_roles.name = 'admin') AND (mtdevise_roles.resource_type = 'Mtdevise::Account') AND (mtdevise_roles.resource_id = 1)))) [["user_id", 1]]  (6.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.4ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.3ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (4.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms) Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (7.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "nonexisting"]] Processing by Mtdevise::Account::DashboardController#index as HTML Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? [["subdomain", "nonexisting"]] Redirected to http://example.com/ Filter chain halted as :check_subdomain rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.0ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 5ms (Views: 5.0ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (8.7ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (9.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "e2Wdb_RyjLs1HL6UtT32"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$7UEyPldi137PrZSBb9yrYu1lTjsevxInvqKaYFIQEtDONtlZ5aPtu"], ["confirmed_at", "2016-01-15 01:37:32.709455"], ["authentication_token", "e2Wdb_RyjLs1HL6UtT32"], ["created_at", "2016-01-15 01:37:32.711867"], ["updated_at", "2016-01-15 01:37:32.711867"]]  (6.0ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:32.743445"], ["current_sign_in_at", "2016-01-15 01:37:32.743445"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:32.744198"], ["id", 1]]  (6.9ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.3ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.2ms) Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Mtdevise::WelcomeController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_logged_in_users_to_account_page rendered or redirected Completed 302 Found in 3ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:32 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (1.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms)  (9.0ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.2ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (9.1ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'user@example.com' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "Xp3yBwTCtv1_ZSjLHxJv"]] Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."confirmation_token" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["confirmation_token", "438053e24f1bc1a95bf874d264e642c762cc417451a0d28fca1bcf0a86cb24c3"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "authentication_token", "created_at", "updated_at", "confirmation_token", "confirmation_sent_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["email", "user@example.com"], ["encrypted_password", "$2a$04$Z98ff0mgQd9SpJEs6sRMfOpSUHfI1o6aWOffKSLpJyHIU2p0oH9sC"], ["authentication_token", "Xp3yBwTCtv1_ZSjLHxJv"], ["created_at", "2016-01-15 01:37:32.885774"], ["updated_at", "2016-01-15 01:37:32.885774"], ["confirmation_token", "BUTnNyvYs3yXPk5Yusn6"], ["confirmation_sent_at", "2016-01-15 01:37:32.886508"]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/mailer/confirmation_instructions.html.erb (3.6ms) Devise::Mailer#confirmation_instructions: processed outbound mail in 5.2ms Sent mail to user@example.com (2.8ms) Date: Fri, 15 Jan 2016 01:37:32 +0000 From: multi-tenancy@phcnetworks.net Reply-To: multi-tenancy@phcnetworks.net To: user@example.com Message-ID: <56984d5cda6e1_2e8b1f328331e3@phcdevtwo-149891.mail> Subject: Confirmation instructions Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Welcome user@example.com!

You can confirm your account through the link below:

Confirm my account

SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["subdomain", "test"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:32.896294"], ["updated_at", "2016-01-15 01:37:32.896294"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:32.906544"], ["updated_at", "2016-01-15 01:37:32.906544"]]  (7.2ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "confirmed_at" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["confirmed_at", "2016-01-15 01:37:32.914781"], ["updated_at", "2016-01-15 01:37:32.915209"], ["id", 1]]  (6.9ms) commit transaction Mtdevise::User Load (0.3ms) SELECT "mtdevise_users".* FROM "mtdevise_users" INNER JOIN "mtdevise_members" ON "mtdevise_users"."id" = "mtdevise_members"."user_id" WHERE "mtdevise_members"."account_id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["account_id", 1]]  (5.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.0ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (8.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test16@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "kbFsCxbS8z5Rw9_UURae"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test16@example.com"], ["encrypted_password", "$2a$04$nYP822caZa3KFYVDQAePU.4dwJQusTHniNuisOeCeHJmhI02/fkMq"], ["confirmed_at", "2016-01-15 01:37:33.032427"], ["authentication_token", "kbFsCxbS8z5Rw9_UURae"], ["created_at", "2016-01-15 01:37:33.034507"], ["updated_at", "2016-01-15 01:37:33.034507"]]  (8.1ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test11' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #11' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test11' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #11"], ["firstname", "Test11"], ["lastname", "Test11"], ["username", "test11"], ["subdomain", "test11"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:33.046399"], ["updated_at", "2016-01-15 01:37:33.046399"]]  (6.7ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:33.055783"], ["updated_at", "2016-01-15 01:37:33.055783"]]  (5.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test17@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "y_mJ8zrJ4r2sD-gpwXeq"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test17@example.com"], ["encrypted_password", "$2a$04$Fib.OlMSNl5BfhqrRuyjZeAHOYOX5ZeH2Ht6vkUfWuG93voNJRh6S"], ["confirmed_at", "2016-01-15 01:37:33.064335"], ["authentication_token", "y_mJ8zrJ4r2sD-gpwXeq"], ["created_at", "2016-01-15 01:37:33.066166"], ["updated_at", "2016-01-15 01:37:33.066166"]]  (9.5ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test12' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #12' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test12' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #12"], ["firstname", "Test12"], ["lastname", "Test12"], ["username", "test12"], ["subdomain", "test12"], ["owner_id", 2], ["created_at", "2016-01-15 01:37:33.079196"], ["updated_at", "2016-01-15 01:37:33.079196"]]  (6.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:37:33.088614"], ["updated_at", "2016-01-15 01:37:33.088614"]]  (5.4ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:37:33.099904"], ["updated_at", "2016-01-15 01:37:33.099904"]]  (5.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:37:33.106878"], ["updated_at", "2016-01-15 01:37:33.106878"]]  (6.8ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.3ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test17@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test17@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:33.138051"], ["current_sign_in_at", "2016-01-15 01:37:33.138051"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:33.138681"], ["id", 2]]  (6.7ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 2]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 2]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test12"]] Processing by ThingsController#index as HTML Thing Load (0.2ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 2]] Rendered things/index.html.erb within layouts/application (1.0ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.2ms)  (9.4ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.4ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.6ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test19@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "2V1E_6U5LRsn-Keif7PJ"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test19@example.com"], ["encrypted_password", "$2a$04$lVzWxoxj2tIx3JXAXcQh0u0VVrkUdoWy6dXNw/rOKZ8lVwLx8EvGS"], ["confirmed_at", "2016-01-15 01:37:33.246038"], ["authentication_token", "2V1E_6U5LRsn-Keif7PJ"], ["created_at", "2016-01-15 01:37:33.248105"], ["updated_at", "2016-01-15 01:37:33.248105"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test13' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #13' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test13' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #13"], ["firstname", "Test13"], ["lastname", "Test13"], ["username", "test13"], ["subdomain", "test13"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:33.257660"], ["updated_at", "2016-01-15 01:37:33.257660"]]  (6.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:33.267228"], ["updated_at", "2016-01-15 01:37:33.267228"]]  (6.9ms) commit transaction  (0.0ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test20@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "91UVzejvbGDEoSZa1qrs"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test20@example.com"], ["encrypted_password", "$2a$04$P.RqUxgurj7iurgyKdtnPuP5it.FXTeTvCHgVSAmoVba7XZ1UO8Ym"], ["confirmed_at", "2016-01-15 01:37:33.277150"], ["authentication_token", "91UVzejvbGDEoSZa1qrs"], ["created_at", "2016-01-15 01:37:33.279068"], ["updated_at", "2016-01-15 01:37:33.279068"]]  (7.0ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test14' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #14' AND "mtdevise_accounts"."owner_id" = 2) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test14' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #14"], ["firstname", "Test14"], ["lastname", "Test14"], ["username", "test14"], ["subdomain", "test14"], ["owner_id", 2], ["created_at", "2016-01-15 01:37:33.289908"], ["updated_at", "2016-01-15 01:37:33.289908"]]  (6.6ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["user_id", 2], ["created_at", "2016-01-15 01:37:33.299020"], ["updated_at", "2016-01-15 01:37:33.299020"]]  (9.2ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["name", "Account A's Thing"], ["created_at", "2016-01-15 01:37:33.309802"], ["updated_at", "2016-01-15 01:37:33.309802"]]  (6.5ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "things" ("account_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 2], ["name", "Account B's Thing"], ["created_at", "2016-01-15 01:37:33.317616"], ["updated_at", "2016-01-15 01:37:33.317616"]]  (6.4ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test19@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test19@example.com"]]  (0.0ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:33.348976"], ["current_sign_in_at", "2016-01-15 01:37:33.348976"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:33.349604"], ["id", 1]]  (6.8ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 7.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.6ms | ActiveRecord: 0.2ms) Started GET "/things" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = ? ORDER BY "mtdevise_accounts"."id" ASC LIMIT 1 [["subdomain", "test13"]] Processing by ThingsController#index as HTML Thing Load (0.1ms) SELECT "things".* FROM "things" WHERE "things"."account_id" = ? [["account_id", 1]] Rendered things/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (8.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.6ms) DELETE FROM sqlite_sequence where name = 'things';  (7.1ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.7ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.7ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.8ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test22@example.com' LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "_AaXJ17v2z3b3NvoAyXR"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test22@example.com"], ["encrypted_password", "$2a$04$r.wpteA7cx4e9trJE7zS5emt0AgyP5O/kowUtdI.Wa9FadSmWP/HC"], ["confirmed_at", "2016-01-15 01:37:33.490105"], ["authentication_token", "_AaXJ17v2z3b3NvoAyXR"], ["created_at", "2016-01-15 01:37:33.492225"], ["updated_at", "2016-01-15 01:37:33.492225"]]  (5.8ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test15' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #15' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test15' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #15"], ["firstname", "Test15"], ["lastname", "Test15"], ["username", "test15"], ["subdomain", "test15"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:33.501894"], ["updated_at", "2016-01-15 01:37:33.501894"]]  (9.1ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:33.514004"], ["updated_at", "2016-01-15 01:37:33.514004"]]  (7.1ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 10.0ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test22@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test22@example.com"]]  (0.1ms) begin transaction SQL (0.1ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:33.546013"], ["current_sign_in_at", "2016-01-15 01:37:33.546013"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:33.546681"], ["id", 1]]  (7.0ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 15ms (ActiveRecord: 7.4ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (2.1ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.2ms)  (5.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.9ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (7.0ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.8ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test24@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "8aRe95E2nisTDae3dty1"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test24@example.com"], ["encrypted_password", "$2a$04$OPlRLSP7qRyANSIikRNhaONQTeRIGNP4i97erSobphxWw45PxpLLq"], ["confirmed_at", "2016-01-15 01:37:33.636785"], ["authentication_token", "8aRe95E2nisTDae3dty1"], ["created_at", "2016-01-15 01:37:33.638849"], ["updated_at", "2016-01-15 01:37:33.638849"]]  (7.4ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test16' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #16' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test16' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #16"], ["firstname", "Test16"], ["lastname", "Test16"], ["username", "test16"], ["subdomain", "test16"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:33.650073"], ["updated_at", "2016-01-15 01:37:33.650073"]]  (7.4ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:33.660088"], ["updated_at", "2016-01-15 01:37:33.660088"]]  (5.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test24@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.2ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "test24@example.com"]] Completed 401 Unauthorized in 3ms (ActiveRecord: 0.2ms) Processing by Devise::SessionsController#new as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"test24@example.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.6ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 12ms (Views: 9.8ms | ActiveRecord: 0.0ms)  (9.2ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.8ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.8ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (5.8ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.5ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (5.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.4ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (6.5ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (6.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (9.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (8.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'orbanbotond@gmail.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "St2UyoG2vMFZLFBwthts"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "orbanbotond@gmail.com"], ["encrypted_password", "$2a$04$Afp9APRHYLDU0qoJ9fwdue5IqRA3t1nysO9HZBzXVwrJN5bhBBt0C"], ["confirmed_at", "2016-01-15 01:37:33.817762"], ["authentication_token", "St2UyoG2vMFZLFBwthts"], ["created_at", "2016-01-15 01:37:33.820153"], ["updated_at", "2016-01-15 01:37:33.820153"]]  (5.7ms) commit transaction Started GET "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#new as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_validation.html.erb (0.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/shared/_links.html.erb (4.4ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/devise/sessions/new.html.erb within layouts/mtdevise/application (7.5ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.0ms) Started POST "/users/sign_in" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {"utf8"=>"✓", "user"=>{"email"=>"orbanbotond@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign-In"} Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."email" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["email", "orbanbotond@gmail.com"]]  (0.1ms) begin transaction SQL (0.2ms) UPDATE "mtdevise_users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "last_sign_in_ip" = ?, "current_sign_in_ip" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "mtdevise_users"."id" = ? [["last_sign_in_at", "2016-01-15 01:37:33.850871"], ["current_sign_in_at", "2016-01-15 01:37:33.850871"], ["last_sign_in_ip", "127.0.0.1"], ["current_sign_in_ip", "127.0.0.1"], ["sign_in_count", 1], ["updated_at", "2016-01-15 01:37:33.851543"], ["id", 1]]  (6.1ms) commit transaction Redirected to http://example.com/accounts Completed 302 Found in 14ms (ActiveRecord: 6.5ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (1.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.2ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Mtdevise::AccountsController#new as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Redirected to http://example.com/accounts Filter chain halted as :redirect_if_coming_form_sign_up rendered or redirected Completed 302 Found in 1ms (ActiveRecord: 0.1ms) Started GET "/accounts" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Mtdevise::AccountsController#index as HTML Mtdevise::User Load (0.1ms) SELECT "mtdevise_users".* FROM "mtdevise_users" WHERE "mtdevise_users"."id" = ? ORDER BY "mtdevise_users"."id" ASC LIMIT 1 [["id", 1]] Mtdevise::Account Load (0.1ms) SELECT "mtdevise_accounts".* FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."owner_id" = ? [["owner_id", 1]] Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/accounts/index.html.erb within layouts/mtdevise/accountsindex (3.8ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 8ms (Views: 6.2ms | ActiveRecord: 0.2ms)  (9.1ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (9.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.9ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (5.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:37:33 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.0ms)  (10.8ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (7.2ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.7ms) DELETE FROM "mtdevise_users";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.9ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (5.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.2ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.9ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::User Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_users" WHERE "mtdevise_users"."email" = 'test25@example.com' LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "mtdevise_users" WHERE "mtdevise_users"."authentication_token" = ? [["authentication_token", "VR-fZ3sr-eNvST1iMb6j"]] SQL (0.2ms) INSERT INTO "mtdevise_users" ("email", "encrypted_password", "confirmed_at", "authentication_token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test25@example.com"], ["encrypted_password", "$2a$04$bRFSymp7JeDqaNQcXI5hO.utuUfmFsB8PsVX7YxxZAEktCoIICIHq"], ["confirmed_at", "2016-01-15 01:37:34.041943"], ["authentication_token", "VR-fZ3sr-eNvST1iMb6j"], ["created_at", "2016-01-15 01:37:34.044280"], ["updated_at", "2016-01-15 01:37:34.044280"]]  (5.6ms) commit transaction  (0.0ms) begin transaction Mtdevise::Account Exists (0.2ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test17' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test Account #17' AND "mtdevise_accounts"."owner_id" = 1) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test17' LIMIT 1 SQL (0.1ms) INSERT INTO "mtdevise_accounts" ("name", "firstname", "lastname", "username", "subdomain", "owner_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["name", "Test Account #17"], ["firstname", "Test17"], ["lastname", "Test17"], ["username", "test17"], ["subdomain", "test17"], ["owner_id", 1], ["created_at", "2016-01-15 01:37:34.054014"], ["updated_at", "2016-01-15 01:37:34.054014"]]  (7.6ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "mtdevise_members" ("account_id", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["account_id", 1], ["user_id", 1], ["created_at", "2016-01-15 01:37:34.064812"], ["updated_at", "2016-01-15 01:37:34.064812"]]  (7.0ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:34 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.7ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:37:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (7.5ms) DELETE FROM "things";  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.6ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (6.7ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (8.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.6ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (5.4ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.7ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.3ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:34 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (2.9ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:37:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.0ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (8.5ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (7.3ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles'; Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:34 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.2ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:37:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (7.0ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.5ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (7.1ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (6.7ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (5.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';  (0.1ms) begin transaction Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."subdomain" = 'test' LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE ("mtdevise_accounts"."name" = 'Test' AND "mtdevise_accounts"."owner_id" IS NULL) LIMIT 1 Mtdevise::Account Exists (0.1ms) SELECT 1 AS one FROM "mtdevise_accounts" WHERE "mtdevise_accounts"."username" = 'test' LIMIT 1 SQL (0.2ms) INSERT INTO "mtdevise_accounts" ("subdomain", "name", "firstname", "lastname", "username", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["subdomain", "test"], ["name", "Test"], ["firstname", "Test"], ["lastname", "Test"], ["username", "test"], ["created_at", "2016-01-15 01:37:34.270841"], ["updated_at", "2016-01-15 01:37:34.270841"]]  (6.9ms) commit transaction Started GET "/" for 127.0.0.1 at 2016-01-15 01:37:34 +0000 Processing by Mtdevise::WelcomeController#index as HTML Rendered /home/nitrous/code/multi-tenancy-devise/app/views/mtdevise/welcome/index.html.erb within layouts/mtdevise/welcome (3.0ms) Rendered /home/nitrous/code/multi-tenancy-devise/app/views/shared/_flash.html.erb (0.1ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.0ms) Started GET "/sign_up" for 127.0.0.1 at 2016-01-15 01:37:34 +0000 Processing by Mtdevise::AccountsController#new as HTML Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)  (7.6ms) DELETE FROM "things";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'things';  (5.7ms) DELETE FROM "mtdevise_accounts";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (7.9ms) DELETE FROM sqlite_sequence where name = 'mtdevise_accounts';  (6.9ms) DELETE FROM "mtdevise_users";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users';  (8.5ms) DELETE FROM "mtdevise_members";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_members';  (6.8ms) DELETE FROM "mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_roles';  (6.6ms) DELETE FROM "mtdevise_users_mtdevise_roles";  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';  (0.1ms) DELETE FROM sqlite_sequence where name = 'mtdevise_users_mtdevise_roles';