-
-
Save marcamillion/9171fc4ad001ef5d2bd1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DashboardController < ApplicationController | |
# load_and_authorize_resource | |
include ApplicationHelper | |
include Tagging | |
def index | |
#truncated for brevity | |
@tagged_nodes = nodes_that_are_tagged_with(current_user) | |
if !@tagged_nodes.empty? | |
@tagged_users = find_tagged_users_from(@tagged_nodes) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe DashboardController do | |
include ApplicationHelper | |
include Tagging | |
describe 'GET #index' do | |
let(:family_tree) { create(:family_tree, user: @user) } | |
let(:node1) { create(:node, family_tree: family_tree, user: @user) } | |
let(:node2) { create(:node, family_tree: family_tree, user: @user) } | |
before { login_user } | |
it "assigns all the nodes that are tagged with the current_user email to local variable 'tagged_nodes'" do | |
u1 = create(:user) | |
u2 = create(:user) | |
n1 = create(:node, family_tree: family_tree) | |
n1.user_tag_list.add(u1.email, u2.email) | |
get :index | |
# expect(assigns(:tagged_nodes)).to match Node.includes(:user_tags).tagged_with(u1.email) | |
expect(assigns(:tagged_nodes)).to include(n1) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Failures: | |
1) DashboardController GET #index assigns all the nodes that are tagged with the current_user email to local variable 'tagged_nodes' | |
Failure/Error: expect(assigns(:tagged_nodes)).to include(n1) | |
expected #<ActiveRecord::Relation []> to include #<Node id: 21, name: "Dorris Hauck", family_tree_id: 38, user_id: nil, media_id: 21, media_type: "Video", created_at: "2015-05-09 01:31:19", updated_at: "2015-05-09 01:31:19", circa: "2015-05-10 00:00:00", is_comment: nil> | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[#<Node id: 21, name: "Dorris Hauck", family_tree_id: 38, user_id: nil, media_id: 21, media_type: "Video", created_at: "2015-05-09 01:31:19", updated_at: "2015-05-09 01:31:19", circa: "2015-05-10 00:00:00", is_comment: nil>] | |
+[] | |
# ./spec/controllers/dashboard_controller_spec.rb:48:in `block (3 levels) in <top (required)>' | |
Finished in 1.88 seconds (files took 5.17 seconds to load) | |
86 examples, 1 failure, 10 pending | |
Failed examples: | |
rspec ./spec/controllers/dashboard_controller_spec.rb:39 # DashboardController GET #index assigns all the nodes that are tagged with the current_user email to local variable 'tagged_nodes' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SpecAuthentication | |
def login_user | |
@request.env["devise.mapping"] = Devise.mappings[:user] | |
@user = FactoryGirl.create :user | |
sign_in @user | |
end | |
end | |
RSpec.configure do |config| | |
# Add Config info for Devise | |
config.include Devise::TestHelpers, type: :controller | |
# Add login for Devise | |
config.include SpecAuthentication, type: :controller | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Tagging | |
extend ActiveSupport::Concern | |
def nodes_that_are_tagged_with(user) | |
Node.includes(:user_tags).tagged_with(user.email) | |
end | |
def find_tagged_users_from(tagged_nodes) | |
tags = tagged_nodes.collect do |node| | |
node.user_tags | |
end | |
tags.flatten! | |
tagged_users = tags.collect do |tag| | |
User.find_by email: tag.name | |
end | |
tagged_users.reject!(&:blank?) | |
end | |
#truncated for brevity | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Processing by DashboardController#index as HTML | |
[1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 14 ORDER BY "users"."id" ASC LIMIT 1 | |
[1m[36mFamilyTree Load (0.1ms)[0m [1mSELECT "family_trees".* FROM "family_trees" WHERE "family_trees"."user_id" = $1 LIMIT 1[0m [["user_id", 14]] | |
[1m[35mActsAsTaggableOn::Tag Load (0.3ms)[0m SELECT "tags".* FROM "tags" WHERE (LOWER(name) = LOWER('efrain@turner.info')) | |
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "nodes" WHERE (1 = 0)[0m | |
Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 1.0ms) | |
[1m[35mNode Load (0.3ms)[0m SELECT "nodes".* FROM "nodes" WHERE (1 = 0) | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.8ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2015-05-09 00:58:31.272444"], ["name", "Maximus Jaskolski"], ["updated_at", "2015-05-09 00:58:31.272444"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mUser Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."email" = 'elenora.dare@wunsch.net' LIMIT 1[0m | |
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("bio", "confirmed_at", "created_at", "email", "encrypted_password", "first_name", "gender", "invitation_relation", "last_name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["bio", "Cupiditate et neque consectetur ullam quos. Qui voluptate quod adipisci harum mollitia. Saepe modi nisi qui architecto nihil illo."], ["confirmed_at", "2015-05-09 00:58:28.729520"], ["created_at", "2015-05-09 00:58:31.280284"], ["email", "elenora.dare@wunsch.net"], ["encrypted_password", "$2a$04$tMdx3RwzpC6ozpDV1OMLVe55qla7zz/vSWzk2KQmrt5WwzPPQTsIy"], ["first_name", "Ladarius"], ["gender", 1], ["invitation_relation", "autem"], ["last_name", "Boehm"], ["updated_at", "2015-05-09 00:58:31.280284"]] | |
[1m[36mMembership Load (0.1ms)[0m [1mSELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 39]] | |
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "memberships" ON "users"."id" = "memberships"."user_id" WHERE "memberships"."family_tree_id" = $1 [["family_tree_id", 39]] | |
[1m[36mNode Load (0.1ms)[0m [1mSELECT "nodes".* FROM "nodes" WHERE "nodes"."family_tree_id" = $1[0m [["family_tree_id", 39]] | |
[1m[35mSQL (0.1ms)[0m DELETE FROM "family_trees" WHERE "family_trees"."id" = $1 [["id", 39]] | |
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.285025"], ["name", "Ladarius Boehm's Family Tree"], ["updated_at", "2015-05-09 00:58:31.285025"], ["user_id", 17]] | |
[1m[35m (0.3ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.2ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2015-05-09 00:58:31.289959"], ["name", "Kira Stanton MD"], ["updated_at", "2015-05-09 00:58:31.289959"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mUser Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."email" = 'tanya@lueilwitznitzsche.com' LIMIT 1[0m | |
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("bio", "confirmed_at", "created_at", "email", "encrypted_password", "first_name", "gender", "invitation_relation", "last_name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["bio", "Velit qui aperiam quidem similique quis error omnis. Dolore eum eum voluptas ipsa. Est ex dolore sapiente nihil nulla."], ["confirmed_at", "2015-05-09 00:58:28.729520"], ["created_at", "2015-05-09 00:58:31.296085"], ["email", "tanya@lueilwitznitzsche.com"], ["encrypted_password", "$2a$04$v6kBfC.JZ1h54HfPhb90f.pfVXu4S6MjTgOPAmQIdFyMLYdE5F0JO"], ["first_name", "Everette"], ["gender", 1], ["invitation_relation", "tempore"], ["last_name", "Miller"], ["updated_at", "2015-05-09 00:58:31.296085"]] | |
[1m[36mMembership Load (0.1ms)[0m [1mSELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 41]] | |
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "memberships" ON "users"."id" = "memberships"."user_id" WHERE "memberships"."family_tree_id" = $1 [["family_tree_id", 41]] | |
[1m[36mNode Load (0.1ms)[0m [1mSELECT "nodes".* FROM "nodes" WHERE "nodes"."family_tree_id" = $1[0m [["family_tree_id", 41]] | |
[1m[35mSQL (0.1ms)[0m DELETE FROM "family_trees" WHERE "family_trees"."id" = $1 [["id", 41]] | |
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.301638"], ["name", "Everette Miller's Family Tree"], ["updated_at", "2015-05-09 00:58:31.301638"], ["user_id", 18]] | |
[1m[35m (0.2ms)[0m COMMIT | |
[1m[36m (0.4ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.2ms)[0m INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.321209"], ["description", "Neque alias eveniet maiores perferendis sint quae et placeat sit velit sit."], ["title", "Qui nobis possimus perspiciatis in harum ut suscipit."], ["updated_at", "2015-05-09 00:58:31.321209"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.4ms)[0m BEGIN | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "nodes" ("circa", "created_at", "media_id", "media_type", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["circa", "2015-05-28 00:00:00.000000"], ["created_at", "2015-05-09 00:58:31.330323"], ["media_id", 22], ["media_type", "Video"], ["name", "Earl Reichert"], ["updated_at", "2015-05-09 00:58:31.330323"]] | |
[1m[35m (0.6ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.2ms)[0m INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.338043"], ["description", "Porro pariatur suscipit nesciunt velit alias accusamus illo consequatur exercitationem totam tenetur dicta."], ["title", "Officia unde architecto ducimus nihil."], ["updated_at", "2015-05-09 00:58:31.338043"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "nodes" ("circa", "created_at", "media_id", "media_type", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["circa", "2015-05-24 00:00:00.000000"], ["created_at", "2015-05-09 00:58:31.340669"], ["media_id", 23], ["media_type", "Video"], ["name", "Cortez Schowalter"], ["updated_at", "2015-05-09 00:58:31.340669"]] | |
[1m[35m (0.3ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.2ms)[0m INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.345654"], ["description", "Laborum mollitia dignissimos suscipit praesentium magni aut deleniti qui impedit est."], ["title", "Est quia et."], ["updated_at", "2015-05-09 00:58:31.345654"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.2ms)[0m BEGIN | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "nodes" ("circa", "created_at", "media_id", "media_type", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["circa", "2015-05-14 00:00:00.000000"], ["created_at", "2015-05-09 00:58:31.348659"], ["media_id", 24], ["media_type", "Video"], ["name", "Emmy Jacobs"], ["updated_at", "2015-05-09 00:58:31.348659"]] | |
[1m[35m (0.2ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.2ms)[0m INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.409653"], ["description", "Non hic et est vel temporibus quos vero vel fugit nobis."], ["title", "Explicabo modi voluptas voluptas nisi suscipit et."], ["updated_at", "2015-05-09 00:58:31.409653"]] | |
[1m[36m (0.2ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.414247"], ["description", "Reiciendis enim rerum a sit sed voluptatem perspiciatis sit."], ["title", "Sed consequuntur optio quibusdam ut ratione et."], ["updated_at", "2015-05-09 00:58:31.414247"]] | |
[1m[35m (0.2ms)[0m COMMIT | |
[1m[36m (0.4ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.2ms)[0m INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.419508"], ["description", "Omnis quis odio aliquam enim accusamus similique porro."], ["title", "Voluptates qui consequuntur id."], ["updated_at", "2015-05-09 00:58:31.419508"]] | |
[1m[36m (0.2ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.425180"], ["description", "Aperiam occaecati quaerat adipisci aliquam itaque magni et."], ["title", "Et autem aut expedita et qui modi."], ["updated_at", "2015-05-09 00:58:31.425180"]] | |
[1m[35m (0.2ms)[0m COMMIT | |
[1m[36m (0.3ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.5ms)[0m INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.430567"], ["description", "Ut dolorum omnis praesentium suscipit dolores culpa velit dignissimos autem."], ["title", "Ut et voluptates voluptas illum facilis."], ["updated_at", "2015-05-09 00:58:31.430567"]] | |
[1m[36m (0.4ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.3ms)[0m BEGIN | |
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "nodes" ("circa", "created_at", "media_id", "media_type", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["circa", "2015-05-30 00:00:00.000000"], ["created_at", "2015-05-09 00:58:31.435325"], ["media_id", 29], ["media_type", "Video"], ["name", "Amya Witting"], ["updated_at", "2015-05-09 00:58:31.435325"]] | |
[1m[35m (0.4ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.3ms)[0m INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.441972"], ["description", "Dolores deleniti est nesciunt maxime exercitationem velit suscipit et."], ["title", "Voluptatem sunt aperiam et totam rerum."], ["updated_at", "2015-05-09 00:58:31.441972"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.2ms)[0m BEGIN | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.449780"], ["description", "Aspernatur nihil molestiae enim dolor vitae eius error."], ["title", "Reprehenderit sit distinctio cumque unde voluptas."], ["updated_at", "2015-05-09 00:58:31.449780"]] | |
[1m[35m (0.2ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.4ms)[0m INSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.454222"], ["description", "Et quia eos sunt inventore non ipsum labore."], ["title", "Qui non nihil voluptatem aliquam laboriosam."], ["updated_at", "2015-05-09 00:58:31.454222"]] | |
[1m[36m (2.5ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.4ms)[0m BEGIN | |
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "nodes" ("circa", "created_at", "media_id", "media_type", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["circa", "2015-05-17 00:00:00.000000"], ["created_at", "2015-05-09 00:58:31.462910"], ["media_id", 32], ["media_type", "Video"], ["name", "Alessia Beatty"], ["updated_at", "2015-05-09 00:58:31.462910"]] | |
[1m[35m (0.3ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.2ms)[0m INSERT INTO "comments" ("created_at", "message", "node_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.467951"], ["message", "Autem pariatur doloribus atque aliquid ipsam."], ["node_id", 26], ["updated_at", "2015-05-09 00:58:31.467951"]] | |
[1m[36m (0.2ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "node_comments" WHERE "node_comments"."node_id" = $1 [["node_id", 26]] | |
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "comments" WHERE "comments"."node_id" = $1[0m [["node_id", 26]] | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "videos" ("created_at", "description", "title", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.491258"], ["description", "Molestiae explicabo magni laborum ex corrupti ipsum aperiam voluptatem quo rem dicta."], ["title", "Cum non eveniet ut."], ["updated_at", "2015-05-09 00:58:31.491258"]] | |
[1m[35m (0.4ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.8ms)[0m INSERT INTO "nodes" ("circa", "created_at", "media_id", "media_type", "name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["circa", "2015-05-24 00:00:00.000000"], ["created_at", "2015-05-09 00:58:31.546668"], ["media_id", 33], ["media_type", "Video"], ["name", "Eleanora Bogan"], ["updated_at", "2015-05-09 00:58:31.546668"]] | |
[1m[36m (0.4ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "comments" ("created_at", "message", "node_id", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.551984"], ["message", "Molestiae ad sint et."], ["node_id", 27], ["updated_at", "2015-05-09 00:58:31.551984"]] | |
[1m[35m (0.4ms)[0m COMMIT | |
[1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "comments" WHERE "comments"."node_id" = $1[0m [["node_id", 27]] | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.570019"], ["name", "Dr. Parker Reichert"], ["updated_at", "2015-05-09 00:58:31.570019"]] | |
[1m[35m (0.4ms)[0m COMMIT | |
[1m[36m (0.2ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.3ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2015-05-09 00:58:31.578206"], ["name", "Alex Padberg"], ["updated_at", "2015-05-09 00:58:31.578206"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mUser Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."email" = 'marcelina.wisozk@rohan.com' LIMIT 1[0m | |
[1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("bio", "confirmed_at", "created_at", "email", "encrypted_password", "first_name", "gender", "invitation_relation", "last_name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["bio", "At alias saepe. Adipisci et molestiae esse. Culpa deserunt quia quos eum vel aspernatur tenetur. Ratione ut consequatur dignissimos alias soluta dolores eaque. Molestiae nulla et eligendi ut qui."], ["confirmed_at", "2015-05-09 00:58:28.729520"], ["created_at", "2015-05-09 00:58:31.586275"], ["email", "marcelina.wisozk@rohan.com"], ["encrypted_password", "$2a$04$ZGNZ13w8dGQl7NiW75jEEuu1WGUntKssOsOfJgwIsmbKEnrEdOd2O"], ["first_name", "Maiya"], ["gender", 1], ["invitation_relation", "dolorem"], ["last_name", "McClure"], ["updated_at", "2015-05-09 00:58:31.586275"]] | |
[1m[36mMembership Load (0.3ms)[0m [1mSELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 44]] | |
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" INNER JOIN "memberships" ON "users"."id" = "memberships"."user_id" WHERE "memberships"."family_tree_id" = $1 [["family_tree_id", 44]] | |
[1m[36mNode Load (0.2ms)[0m [1mSELECT "nodes".* FROM "nodes" WHERE "nodes"."family_tree_id" = $1[0m [["family_tree_id", 44]] | |
[1m[35mSQL (0.7ms)[0m DELETE FROM "family_trees" WHERE "family_trees"."id" = $1 [["id", 44]] | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.597319"], ["name", "Maiya McClure's Family Tree"], ["updated_at", "2015-05-09 00:58:31.597319"], ["user_id", 19]] | |
[1m[35m (0.4ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mMembership Load (0.2ms)[0m SELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1 [["family_tree_id", 45]] | |
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" INNER JOIN "memberships" ON "users"."id" = "memberships"."user_id" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 45]] | |
[1m[35mNode Load (0.2ms)[0m SELECT "nodes".* FROM "nodes" WHERE "nodes"."family_tree_id" = $1 [["family_tree_id", 45]] | |
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "family_trees" WHERE "family_trees"."id" = $1[0m [["id", 45]] | |
[1m[35m (0.2ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.4ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.610875"], ["name", "Maiya McClure's Family Tree"], ["updated_at", "2015-05-09 00:58:31.610875"], ["user_id", 19]] | |
[1m[36m (0.4ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.615567"], ["name", "Mrs. Maybell Hintz"], ["updated_at", "2015-05-09 00:58:31.615567"]] | |
[1m[35m (0.3ms)[0m COMMIT | |
[1m[36mMembership Load (0.3ms)[0m [1mSELECT "memberships".* FROM "memberships" WHERE "memberships"."user_id" IS NULL[0m | |
[1m[35m (1.1ms)[0m BEGIN | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.631405"], ["name", "Milan Reichel"], ["updated_at", "2015-05-09 00:58:31.631405"]] | |
[1m[35m (0.4ms)[0m COMMIT | |
[1m[36m (0.2ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.3ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2015-05-09 00:58:31.642477"], ["name", "Josefina Bahringer"], ["updated_at", "2015-05-09 00:58:31.642477"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mUser Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."email" = 'johan@upton.com' LIMIT 1[0m | |
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("bio", "confirmed_at", "created_at", "email", "encrypted_password", "first_name", "gender", "invitation_relation", "last_name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["bio", "Molestiae et voluptates. Velit sed labore veniam itaque deleniti. Omnis totam alias voluptas et aut vel."], ["confirmed_at", "2015-05-09 00:58:28.729520"], ["created_at", "2015-05-09 00:58:31.649553"], ["email", "johan@upton.com"], ["encrypted_password", "$2a$04$Fl7DpfbpSspPaU29j/MJPuFWTNAZmHM5AnDsx5c8EqroFxe8YSp5m"], ["first_name", "Andy"], ["gender", 1], ["invitation_relation", "id"], ["last_name", "Krajcik"], ["updated_at", "2015-05-09 00:58:31.649553"]] | |
[1m[36mMembership Load (0.2ms)[0m [1mSELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 49]] | |
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" INNER JOIN "memberships" ON "users"."id" = "memberships"."user_id" WHERE "memberships"."family_tree_id" = $1 [["family_tree_id", 49]] | |
[1m[36mNode Load (0.1ms)[0m [1mSELECT "nodes".* FROM "nodes" WHERE "nodes"."family_tree_id" = $1[0m [["family_tree_id", 49]] | |
[1m[35mSQL (0.2ms)[0m DELETE FROM "family_trees" WHERE "family_trees"."id" = $1 [["id", 49]] | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.655855"], ["name", "Andy Krajcik's Family Tree"], ["updated_at", "2015-05-09 00:58:31.655855"], ["user_id", 20]] | |
[1m[35m (0.3ms)[0m COMMIT | |
[1m[36m (0.2ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.5ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.659387"], ["name", "Charles Harvey DDS"], ["updated_at", "2015-05-09 00:58:31.659387"], ["user_id", 20]] | |
[1m[36m (0.8ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.666603"], ["name", "Brycen Abshire V"], ["updated_at", "2015-05-09 00:58:31.666603"]] | |
[1m[35m (0.3ms)[0m COMMIT | |
[1m[36m (0.2ms)[0m [1mBEGIN[0m | |
[1m[35mUser Exists (0.5ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."email" = 'reanna@quitzon.biz' LIMIT 1 | |
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("bio", "confirmed_at", "created_at", "email", "encrypted_password", "first_name", "gender", "invitation_relation", "last_name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["bio", "Aperiam in aliquid. Quaerat facilis qui at vel sed autem. Non corporis quidem est eum. Corporis dolor doloremque accusantium. Magnam molestiae vel sed dicta et nihil."], ["confirmed_at", "2015-05-09 00:58:28.729520"], ["created_at", "2015-05-09 00:58:31.676976"], ["email", "reanna@quitzon.biz"], ["encrypted_password", "$2a$04$RY8ntMEn8zd6WVHuIchjYONPU/LnF51G.f5bZGemXwWsGFwVdP.aa"], ["first_name", "Terrell"], ["gender", 1], ["invitation_relation", "ut"], ["last_name", "Olson"], ["updated_at", "2015-05-09 00:58:31.676976"]] | |
[1m[35mMembership Load (0.3ms)[0m SELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1 [["family_tree_id", 52]] | |
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" INNER JOIN "memberships" ON "users"."id" = "memberships"."user_id" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 52]] | |
[1m[35mNode Load (0.2ms)[0m SELECT "nodes".* FROM "nodes" WHERE "nodes"."family_tree_id" = $1 [["family_tree_id", 52]] | |
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "family_trees" WHERE "family_trees"."id" = $1[0m [["id", 52]] | |
[1m[35mSQL (0.3ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.684874"], ["name", "Terrell Olson's Family Tree"], ["updated_at", "2015-05-09 00:58:31.684874"], ["user_id", 21]] | |
[1m[36m (0.4ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "memberships" ("created_at", "family_tree_id", "relation", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.688273"], ["family_tree_id", 51], ["relation", "sister"], ["updated_at", "2015-05-09 00:58:31.688273"], ["user_id", 21]] | |
[1m[35m (1.5ms)[0m COMMIT | |
[1m[36mMembership Load (1.7ms)[0m [1mSELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1 AND "memberships"."relation" = 'sister' ORDER BY "memberships"."id" ASC LIMIT 1[0m [["family_tree_id", 51]] | |
[1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 21]] | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.3ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2015-05-09 00:58:31.706412"], ["name", "Lambert Fisher"], ["updated_at", "2015-05-09 00:58:31.706412"]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.1ms)[0m BEGIN | |
[1m[36mUser Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "users" WHERE "users"."email" = 'harry@franecki.net' LIMIT 1[0m | |
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("bio", "confirmed_at", "created_at", "email", "encrypted_password", "first_name", "gender", "invitation_relation", "last_name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["bio", "Consequatur ratione ea dolorum quia deleniti aspernatur. Nisi earum libero. Ut est distinctio aspernatur tempora nobis mollitia amet. Aut et aspernatur voluptatem."], ["confirmed_at", "2015-05-09 00:58:28.729520"], ["created_at", "2015-05-09 00:58:31.713340"], ["email", "harry@franecki.net"], ["encrypted_password", "$2a$04$EY5xlpTMtcTswumSwA0L0ONSG5x897u2dEcv2DED1zR2CRvuho8HO"], ["first_name", "Corrine"], ["gender", 1], ["invitation_relation", "dolores"], ["last_name", "Tremblay"], ["updated_at", "2015-05-09 00:58:31.713340"]] | |
[1m[36mMembership Load (0.3ms)[0m [1mSELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 54]] | |
[1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" INNER JOIN "memberships" ON "users"."id" = "memberships"."user_id" WHERE "memberships"."family_tree_id" = $1 [["family_tree_id", 54]] | |
[1m[36mNode Load (0.2ms)[0m [1mSELECT "nodes".* FROM "nodes" WHERE "nodes"."family_tree_id" = $1[0m [["family_tree_id", 54]] | |
[1m[35mSQL (0.2ms)[0m DELETE FROM "family_trees" WHERE "family_trees"."id" = $1 [["id", 54]] | |
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.722497"], ["name", "Corrine Tremblay's Family Tree"], ["updated_at", "2015-05-09 00:58:31.722497"], ["user_id", 22]] | |
[1m[35m (0.4ms)[0m COMMIT | |
[1m[36m (0.2ms)[0m [1mBEGIN[0m | |
[1m[35mSQL (0.3ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.728015"], ["name", "Waldo DuBuque"], ["updated_at", "2015-05-09 00:58:31.728015"], ["user_id", 22]] | |
[1m[36m (0.3ms)[0m [1mCOMMIT[0m | |
[1m[35m (0.3ms)[0m BEGIN | |
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "family_trees" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.732582"], ["name", "Walter Stracke III"], ["updated_at", "2015-05-09 00:58:31.732582"]] | |
[1m[35m (0.3ms)[0m COMMIT | |
[1m[36m (0.1ms)[0m [1mBEGIN[0m | |
[1m[35mUser Exists (1.5ms)[0m SELECT 1 AS one FROM "users" WHERE "users"."email" = 'alexie@champlin.info' LIMIT 1 | |
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("bio", "confirmed_at", "created_at", "email", "encrypted_password", "first_name", "gender", "invitation_relation", "last_name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"[0m [["bio", "Est ut nisi quibusdam. Ad qui recusandae minima suscipit. Maxime doloribus error nulla."], ["confirmed_at", "2015-05-09 00:58:28.729520"], ["created_at", "2015-05-09 00:58:31.740866"], ["email", "alexie@champlin.info"], ["encrypted_password", "$2a$04$gYjRFPxZ88kLnDJPUmypD.K2sR.hf1m5gWTIh/ElHSOHZRJjTSLuW"], ["first_name", "Lily"], ["gender", 1], ["invitation_relation", "ad"], ["last_name", "Flatley"], ["updated_at", "2015-05-09 00:58:31.740866"]] | |
[1m[35mMembership Load (0.3ms)[0m SELECT "memberships".* FROM "memberships" WHERE "memberships"."family_tree_id" = $1 [["family_tree_id", 57]] | |
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" INNER JOIN "memberships" ON "users"."id" = "memberships"."user_id" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 57]] | |
[1m[35mNode Load (0.2ms)[0m SELECT "nodes".* FROM "nodes" WHERE "nodes"."family_tree_id" = $1 [["family_tree_id", 57]] | |
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "family_trees" WHERE "family_trees"."id" = $1[0m [["id", 57]] | |
[1m[35mSQL (0.4ms)[0m INSERT INTO "family_trees" ("created_at", "name", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2015-05-09 00:58:31.750178"], ["name", "Lily Flatley's Family Tree"], ["updated_at", "2015-05-09 00:58:31.750178"], ["user_id", 23]] | |
[1m[36m (0.6ms)[0m [1mCOMMIT[0m | |
[1m[35m (1.0ms)[0m BEGIN | |
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "memberships" ("created_at", "family_tree_id", "relation", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2015-05-09 00:58:31.755893"], ["family_tree_id", 56], ["relation", "nephew"], ["updated_at", "2015-05-09 00:58:31.755893"], ["user_id", 23]] | |
[1m[35m (1.0ms)[0m COMMIT | |
[1m[36m (0.4ms)[0m [1mSELECT "memberships"."relation" FROM "memberships" WHERE "memberships"."family_tree_id" = $1[0m [["family_tree_id", 56]] | |
[1m[35m (0.4ms)[0m SELECT "memberships"."relation" FROM "memberships" WHERE "memberships"."user_id" = $1 AND "memberships"."relation" = 'nephew' [["user_id", 23]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment