Skip to content

Instantly share code, notes, and snippets.

@jpemberthy
Created February 1, 2011 20:48
Show Gist options
  • Save jpemberthy/806634 to your computer and use it in GitHub Desktop.
Save jpemberthy/806634 to your computer and use it in GitHub Desktop.
########### WITH TAGGINGS ######### 
##### Factory.create(:user) #######
[4;35;1mMembershipLevel Load (1.0ms) SELECT * FROM "membership_levels" WHERE ("membership_levels"."name" = E'Free') LIMIT 1
SQL (2.1ms) BEGIN
User Load (0.6ms) SELECT "users".id FROM "users" WHERE (LOWER("users"."email") = E'leora6@beahanflatley.com') LIMIT 1
User Load (0.5ms) SELECT "users".id FROM "users" WHERE ("users"."perishable_token" = E'sllS4kgFVivHXfBUtorE') LIMIT 1
User Load (1.3ms) SELECT "users".id FROM "users" WHERE ("users"."persistence_token" = E'8c6520cabeeb79fdfb5b99df8576de16eb58a634437aea0900d587d48ec602ccd0c3a8ef1f1611ccc5dc82d9ebf330de027fc2088ffdcf982ce173059843e208') LIMIT 1
User Load (0.7ms) SELECT "users".id FROM "users" WHERE ("users"."single_access_token" = E'6rfFjyQzn4WPqsPxiIWe') LIMIT 1
SQL (0.8ms) INSERT INTO "users" ("resume_updated_at", "privacy_last_name", "single_access_token", "created_at", "avatar_file_name", "avatar_file_size", "crypted_password", "pending_email", "notification", "perishable_token", "updated_at", "privacy_phone", "employed", "admin", "privacy_resume", "username", "failed_login_count", "current_login_ip", "created_by", "password_salt", "current_login_at", "avatar_content_type", "resume_file_name", "address_id", "privacy_employed", "activation_context", "last_name", "persistence_token", "login_count", "resume_content_type", "resume_file_size", "privacy_email", "phone", "pending_email_token", "updated_by", "last_login_ip", "summary", "last_login_at", "avatar_updated_at", "privacy_address", "registration_job_title", "membership_level_id", "email", "first_name", "middle_name", "active") VALUES(NULL, E'Members', E'6rfFjyQzn4WPqsPxiIWe', '2011-02-01 20:48:14.604457', NULL, NULL, E'8a787221966ec76ea1e1270d976c63b56ef59066d36e89e4bb25a6d6a1a09005e7c39c269543321585b3e894027df82b7df6b01f6ec878368ff2543325673a5b', NULL, E'Immediate', E'3gqQ5qQV1bfKAXOmAlA1', '2011-02-01 20:48:14.604457', E'Private', 't', 'f', E'Private', NULL, 0, NULL, NULL, E'G9ROyB7RcaiFGqf0HTj', NULL, NULL, NULL, NULL, E'Public', NULL, E'Miller', E'8c6520cabeeb79fdfb5b99df8576de16eb58a634437aea0900d587d48ec602ccd0c3a8ef1f1611ccc5dc82d9ebf330de027fc2088ffdcf982ce173059843e208', 0, NULL, NULL, E'Private', NULL, NULL, NULL, NULL, E'Qui quia magnam et. Accusamus est eveniet quas magnam magni accusantium. Autem quo aliquid quia. Deserunt molestiae libero architecto. Maxime ut eligendi sit nemo veritatis ab magni inventore.', NULL, NULL, E'Private', E'Office Administrator', 501, E'leora6@beahanflatley.com', E'Dylan', NULL, 't') RETURNING "id"
ActsAsTaggableOn::Tag Load (0.5ms) SELECT * FROM "tags" WHERE (name ILIKE E'Kung Fu' OR name ILIKE E'Ramen' OR name ILIKE E'Ninjas') 
ActsAsTaggableOn::Tag Load (0.6ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags".id = "taggings".tag_id WHERE (((taggings.context = E'interests' AND taggings.tagger_id IS NULL) AND (("taggings".taggable_id = 1611) AND ("taggings".taggable_type = E'User'))) AND (("taggings".taggable_id = 1611) AND ("taggings".taggable_type = E'User'))) 
ActsAsTaggableOn::Tagging Load (0.4ms) SELECT * FROM "taggings" WHERE ((("taggings"."context" = E'interests' AND "taggings"."tagger_type" IS NULL AND "taggings"."tag_id" IN (NULL) AND "taggings"."tagger_id" IS NULL) AND ("taggings".taggable_id = 1611 AND "taggings".taggable_type = E'User')) AND ("taggings".taggable_id = 1611 AND "taggings".taggable_type = E'User')) 
ActsAsTaggableOn::Tagging Load (0.4ms) SELECT "taggings".id FROM "taggings" WHERE ("taggings"."tag_id" = 1306 AND "taggings".taggable_type = E'User' AND "taggings".taggable_id = 1611 AND "taggings".context = E'interests' AND "taggings".tagger_id IS NULL AND "taggings".tagger_type IS NULL) LIMIT 1
SQL (0.4ms) INSERT INTO "taggings" ("tagger_id", "created_at", "tag_id", "taggable_id", "context", "tagger_type", "taggable_type") VALUES(NULL, '2011-02-01 20:48:14.620945', 1306, 1611, E'interests', NULL, E'User') RETURNING "id"
ActsAsTaggableOn::Tagging Load (0.5ms) SELECT "taggings".id FROM "taggings" WHERE ("taggings"."tag_id" = 1307 AND "taggings".taggable_type = E'User' AND "taggings".taggable_id = 1611 AND "taggings".context = E'interests' AND "taggings".tagger_id IS NULL AND "taggings".tagger_type IS NULL) LIMIT 1
SQL (0.4ms) INSERT INTO "taggings" ("tagger_id", "created_at", "tag_id", "taggable_id", "context", "tagger_type", "taggable_type") VALUES(NULL, '2011-02-01 20:48:14.625368', 1307, 1611, E'interests', NULL, E'User') RETURNING "id"
ActsAsTaggableOn::Tagging Load (0.4ms) SELECT "taggings".id FROM "taggings" WHERE ("taggings"."tag_id" = 1308 AND "taggings".taggable_type = E'User' AND "taggings".taggable_id = 1611 AND "taggings".context = E'interests' AND "taggings".tagger_id IS NULL AND "taggings".tagger_type IS NULL) LIMIT 1
SQL (0.3ms) INSERT INTO "taggings" ("tagger_id", "created_at", "tag_id", "taggable_id", "context", "tagger_type", "taggable_type") VALUES(NULL, '2011-02-01 20:48:14.629174', 1308, 1611, E'interests', NULL, E'User') RETURNING "id"
[paperclip] Saving attachments.
[paperclip] Saving attachments.
SQL (1.9ms) COMMIT
########### WITH TAGGINGS ################################
##### Factory.create(:user, :interest_list => nil) #######
SQL (0.2ms) BEGIN
User Load (0.8ms) SELECT "users".id FROM "users" WHERE (LOWER("users"."email") = E'vivienne7@kemmersanford.name') LIMIT 1
User Load (0.4ms) SELECT "users".id FROM "users" WHERE ("users"."perishable_token" = E'BzAVyxOVNR3QfxASQ1Ly') LIMIT 1
User Load (0.4ms) SELECT "users".id FROM "users" WHERE ("users"."persistence_token" = E'1cbe5fd33a0e6b9f51219fd96f465416b2ebb659183b9df915ad725908c6751f2c31544d0a2a556c243560faef89790f5d788ee5f22a91fa41b0b2e174c2dbc0') LIMIT 1
User Load (0.2ms) SELECT "users".id FROM "users" WHERE ("users"."single_access_token" = E'e595wNnoTaq5LPVcnndh') LIMIT 1
SQL (0.7ms) INSERT INTO "users" ("resume_updated_at", "privacy_last_name", "single_access_token", "created_at", "avatar_file_name", "avatar_file_size", "crypted_password", "pending_email", "notification", "perishable_token", "updated_at", "privacy_phone", "employed", "admin", "privacy_resume", "username", "failed_login_count", "current_login_ip", "created_by", "password_salt", "current_login_at", "avatar_content_type", "resume_file_name", "address_id", "privacy_employed", "activation_context", "last_name", "persistence_token", "login_count", "resume_content_type", "resume_file_size", "privacy_email", "phone", "pending_email_token", "updated_by", "last_login_ip", "summary", "last_login_at", "avatar_updated_at", "privacy_address", "registration_job_title", "membership_level_id", "email", "first_name", "middle_name", "active") VALUES(NULL, E'Members', E'e595wNnoTaq5LPVcnndh', '2011-02-01 20:48:57.989289', NULL, NULL, E'a5f11cc33ae686a5098a4d8c40625ffc019ac4c4edcaaef800b3b57ef21c7e3e18e69e540758e2e5fc2317140e243053defd0c0edd13cf28c1bf7c941fc3ef19', NULL, E'Immediate', E'zawijmGL10mM0fmCdCg7', '2011-02-01 20:48:57.989289', E'Private', 't', 'f', E'Private', NULL, 0, NULL, NULL, E'lZjZq5hRKSatgFEKdtRJ', NULL, NULL, NULL, NULL, E'Public', NULL, E'Langosh', E'1cbe5fd33a0e6b9f51219fd96f465416b2ebb659183b9df915ad725908c6751f2c31544d0a2a556c243560faef89790f5d788ee5f22a91fa41b0b2e174c2dbc0', 0, NULL, NULL, E'Private', NULL, NULL, NULL, NULL, E'Placeat rem ipsa adipisci fugit et id tempore et. Repellendus voluptatibus voluptatem ipsam ullam debitis dolore. Et sapiente sunt voluptatem dolor dolorem non autem repudiandae.', NULL, NULL, E'Private', E'Banking Analyst', 501, E'vivienne7@kemmersanford.name', E'Deven', NULL, 't') RETURNING "id"
ActsAsTaggableOn::Tag Load (0.6ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags".id = "taggings".tag_id WHERE (((taggings.context = E'interests' AND taggings.tagger_id IS NULL) AND (("taggings".taggable_id = 1612) AND ("taggings".taggable_type = E'User'))) AND (("taggings".taggable_id = 1612) AND ("taggings".taggable_type = E'User'))) 
ActsAsTaggableOn::Tagging Load (0.4ms) SELECT * FROM "taggings" WHERE ((("taggings"."context" = E'interests' AND "taggings"."tagger_type" IS NULL AND "taggings"."tag_id" IN (NULL) AND "taggings"."tagger_id" IS NULL) AND ("taggings".taggable_id = 1612 AND "taggings".taggable_type = E'User')) AND ("taggings".taggable_id = 1612 AND "taggings".taggable_type = E'User')) 
[paperclip] Saving attachments.
[paperclip] Saving attachments.
SQL (0.6ms) COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment