Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ruby-1.9.2-p180 :005 > Microspost.where(:id => (190..202).to_a).destroy_all)
- SyntaxError: (irb):5: syntax error, unexpected ')', expecting $end
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :006 > Microspost.find__all
- NameError: uninitialized constant Microspost
- from (irb):6
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :007 > Microspost.find_all
- NameError: uninitialized constant Microspost
- from (irb):7
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :008 > Microspost.find(all)
- NameError: uninitialized constant Microspost
- from (irb):8
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :009 > Microspost.find(1)
- NameError: uninitialized constant Microspost
- from (irb):9
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :010 > Microspost
- NameError: uninitialized constant Microspost
- from (irb):10
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :011 > quit
- Osiris:gigiki Richardson$ rails console
- Loading development environment (Rails 3.2.1)
- ruby-1.9.2-p180 :001 > Microspost.where(:id => (190..202).to_a).destroy_all
- NameError: uninitialized constant Microspost
- from (irb):1
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :002 > Micropost.find(54)
- Micropost Load (12.2ms) SELECT "microposts".* FROM "microposts" WHERE "microposts"."id" = ? ORDER BY microposts.created_at DESC LIMIT 1 [["id", 54]]
- => #<Micropost id: 54, to_guys: true, tag: "2", approved: nil, content: " don't want a perfect person, I just want someone t...", flag: nil, liked: nil, created_at: "2012-03-08 15:24:26", updated_at: "2012-03-08 15:24:26">
- ruby-1.9.2-p180 :003 > Micropost.find((1..200).to_a)
- Micropost Load (1.4ms) SELECT "microposts".* FROM "microposts" WHERE "microposts"."id" IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ORDER BY microposts.created_at DESC
- ActiveRecord::RecordNotFound: Couldn't find all Microposts with IDs (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) (found 30 results, but was looking for 200)
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/activerecord-3.2.1/lib/active_record/relation/finder_methods.rb:369:in `find_some'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/activerecord-3.2.1/lib/active_record/relation/finder_methods.rb:314:in `find_with_ids'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/activerecord-3.2.1/lib/active_record/relation/finder_methods.rb:107:in `find'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/activerecord-3.2.1/lib/active_record/querying.rb:5:in `find'
- from (irb):3
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :004 > Micropost.where(id => (1..200).to_a)
- NameError: undefined local variable or method `id' for main:Object
- from (irb):4
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:47:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands/console.rb:8:in `start'
- from /Users/Richardson/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.2.1/lib/rails/commands.rb:41:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'
- ruby-1.9.2-p180 :005 > Micropost.where(:id => (1..200).to_a)
- Micropost Load (1.1ms) SELECT "microposts".* FROM "microposts" WHERE "microposts"."id" IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200) ORDER BY microposts.created_at DESC
- => [#<Micropost id: 200, to_guys: true, tag: nil, approved: nil, content: "ff", flag: nil, liked: nil, created_at: "2012-04-03 00:07:38", updated_at: "2012-04-03 00:07:38">, #<Micropost id: 199, to_guys: true, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-03 00:06:24", updated_at: "2012-04-03 00:06:24">, #<Micropost id: 198, to_guys: true, tag: nil, approved: nil, content: "ereaebaebrbuearbuoaebrrbearbuaebruabruaerbae aeruab...", flag: nil, liked: nil, created_at: "2012-04-03 00:04:48", updated_at: "2012-04-03 00:04:48">, #<Micropost id: 196, to_guys: true, tag: nil, approved: nil, content: "kungfu", flag: nil, liked: nil, created_at: "2012-04-03 00:04:27", updated_at: "2012-04-03 00:04:27">, #<Micropost id: 195, to_guys: true, tag: nil, approved: nil, content: "eararaer", flag: nil, liked: nil, created_at: "2012-04-03 00:03:13", updated_at: "2012-04-03 00:03:13">, #<Micropost id: 194, to_guys: true, tag: nil, approved: nil, content: "e", flag: nil, liked: nil, created_at: "2012-04-03 00:02:45", updated_at: "2012-04-03 00:02:45">, #<Micropost id: 193, to_guys: false, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-02 23:58:53", updated_at: "2012-04-02 23:58:53">, #<Micropost id: 192, to_guys: true, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-02 23:58:48", updated_at: "2012-04-02 23:58:48">, #<Micropost id: 89, to_guys: false, tag: nil, approved: nil, content: "Guys who don't dress ghetto are cool", flag: nil, liked: nil, created_at: "2012-03-12 20:43:05", updated_at: "2012-03-12 20:43:05">, #<Micropost id: 87, to_guys: false, tag: nil, approved: nil, content: "Lets see if we type a bunch of text it will work pe...", flag: nil, liked: nil, created_at: "2012-03-12 15:18:40", updated_at: "2012-03-12 15:18:40">, #<Micropost id: 69, to_guys: true, tag: nil, approved: nil, content: "Guys should cut their hair", flag: nil, liked: nil, created_at: "2012-03-09 07:31:00", updated_at: "2012-03-09 07:31:00">, #<Micropost id: 68, to_guys: true, tag: nil, approved: nil, content: "A guy who dress classy always look sexy", flag: nil, liked: nil, created_at: "2012-03-08 15:38:28", updated_at: "2012-03-08 15:38:28">, #<Micropost id: 67, to_guys: false, tag: "4", approved: nil, content: "A girl should never start smoking", flag: nil, liked: nil, created_at: "2012-03-08 15:38:02", updated_at: "2012-03-08 15:38:02">, #<Micropost id: 66, to_guys: false, tag: "4", approved: nil, content: "Girls who read books always sound smart", flag: nil, liked: nil, created_at: "2012-03-08 15:37:01", updated_at: "2012-03-08 15:37:01">, #<Micropost id: 65, to_guys: false, tag: nil, approved: nil, content: "Girls who use cursed words are ghetto!", flag: nil, liked: nil, created_at: "2012-03-08 15:34:53", updated_at: "2012-03-08 15:34:53">, #<Micropost id: 64, to_guys: false, tag: nil, approved: nil, content: "We love when you show your legs", flag: nil, liked: nil, created_at: "2012-03-08 15:32:43", updated_at: "2012-03-08 15:32:43">, #<Micropost id: 63, to_guys: true, tag: "2", approved: nil, content: "Be CONSIDERATE", flag: nil, liked: nil, created_at: "2012-03-08 15:30:42", updated_at: "2012-03-08 15:30:42">, #<Micropost id: 62, to_guys: true, tag: "2", approved: nil, content: "Yes, I'm single... And you're gonna have to be pret...", flag: nil, liked: nil, created_at: "2012-03-08 15:28:03", updated_at: "2012-03-08 15:28:03">, #<Micropost id: 61, to_guys: false, tag: "2", approved: nil, content: "You can't keep dating the same type of guy and expe...", flag: nil, liked: nil, created_at: "2012-03-08 15:27:34", updated_at: "2012-03-08 15:27:34">, #<Micropost id: 60, to_guys: true, tag: "2", approved: nil, content: "Words are cheap, Actions are priceless.", flag: nil, liked: nil, created_at: "2012-03-08 15:27:05", updated_at: "2012-03-08 15:27:05">, #<Micropost id: 59, to_guys: true, tag: "2", approved: nil, content: "Being sad with the right people is better than bein...", flag: nil, liked: nil, created_at: "2012-03-08 15:26:28", updated_at: "2012-03-08 15:26:28">, #<Micropost id: 58, to_guys: true, tag: "4", approved: nil, content: "Learn to listen. Oppurtunity sometimes knocks very ...", flag: nil, liked: nil, created_at: "2012-03-08 15:26:08", updated_at: "2012-03-08 15:26:08">, #<Micropost id: 56, to_guys: false, tag: "2", approved: nil, content: "Being single does not mean no one wants you...", flag: nil, liked: nil, created_at: "2012-03-08 15:25:33", updated_at: "2012-03-08 15:25:33">, #<Micropost id: 55, to_guys: true, tag: "2", approved: nil, content: "You can't make the same mistake twice, the second t...", flag: nil, liked: nil, created_at: "2012-03-08 15:25:17", updated_at: "2012-03-08 15:25:17">, #<Micropost id: 54, to_guys: true, tag: "2", approved: nil, content: " don't want a perfect person, I just want someone t...", flag: nil, liked: nil, created_at: "2012-03-08 15:24:26", updated_at: "2012-03-08 15:24:26">, #<Micropost id: 53, to_guys: true, tag: "4", approved: nil, content: "There’s no need to rush. If something is meant to b...", flag: nil, liked: nil, created_at: "2012-03-08 15:23:54", updated_at: "2012-03-08 15:23:54">, #<Micropost id: 52, to_guys: true, tag: "4", approved: nil, content: "His smile. His eyes. His lips. His hair. His laugh....", flag: nil, liked: nil, created_at: "2012-03-08 15:23:29", updated_at: "2012-03-08 15:23:29">, #<Micropost id: 29, to_guys: false, tag: "2", approved: nil, content: "I hate when girls always expect us to pay for every...", flag: nil, liked: nil, created_at: "2012-02-26 09:14:59", updated_at: "2012-02-26 09:14:59">, #<Micropost id: 28, to_guys: true, tag: "4", approved: nil, content: "Guys should learn how to wear their jeans without s...", flag: nil, liked: nil, created_at: "2012-02-26 09:14:34", updated_at: "2012-02-26 09:14:34">, #<Micropost id: 27, to_guys: false, tag: "4", approved: nil, content: "A girl with a tight T-shirt and Jeans always looks ...", flag: nil, liked: nil, created_at: "2012-02-26 09:13:43", updated_at: "2012-02-26 09:13:43">]
- ruby-1.9.2-p180 :006 > Micropost.where(:id => (190..300).to_a)
- Micropost Load (0.7ms) SELECT "microposts".* FROM "microposts" WHERE "microposts"."id" IN (190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300) ORDER BY microposts.created_at DESC
- => [#<Micropost id: 202, to_guys: true, tag: nil, approved: nil, content: "lala", flag: nil, liked: nil, created_at: "2012-04-03 00:08:57", updated_at: "2012-04-03 00:08:57">, #<Micropost id: 201, to_guys: false, tag: nil, approved: nil, content: "ee", flag: nil, liked: nil, created_at: "2012-04-03 00:07:42", updated_at: "2012-04-03 00:07:42">, #<Micropost id: 200, to_guys: true, tag: nil, approved: nil, content: "ff", flag: nil, liked: nil, created_at: "2012-04-03 00:07:38", updated_at: "2012-04-03 00:07:38">, #<Micropost id: 199, to_guys: true, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-03 00:06:24", updated_at: "2012-04-03 00:06:24">, #<Micropost id: 198, to_guys: true, tag: nil, approved: nil, content: "ereaebaebrbuearbuoaebrrbearbuaebruabruaerbae aeruab...", flag: nil, liked: nil, created_at: "2012-04-03 00:04:48", updated_at: "2012-04-03 00:04:48">, #<Micropost id: 196, to_guys: true, tag: nil, approved: nil, content: "kungfu", flag: nil, liked: nil, created_at: "2012-04-03 00:04:27", updated_at: "2012-04-03 00:04:27">, #<Micropost id: 195, to_guys: true, tag: nil, approved: nil, content: "eararaer", flag: nil, liked: nil, created_at: "2012-04-03 00:03:13", updated_at: "2012-04-03 00:03:13">, #<Micropost id: 194, to_guys: true, tag: nil, approved: nil, content: "e", flag: nil, liked: nil, created_at: "2012-04-03 00:02:45", updated_at: "2012-04-03 00:02:45">, #<Micropost id: 193, to_guys: false, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-02 23:58:53", updated_at: "2012-04-02 23:58:53">, #<Micropost id: 192, to_guys: true, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-02 23:58:48", updated_at: "2012-04-02 23:58:48">]
- ruby-1.9.2-p180 :007 > Micropost.where(:id => (190..300).to_a).destroy_all
- Micropost Load (0.7ms) SELECT "microposts".* FROM "microposts" WHERE "microposts"."id" IN (190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300) ORDER BY microposts.created_at DESC
- (0.1ms) begin transaction
- SQL (0.5ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 202]]
- (45.1ms) commit transaction
- (0.1ms) begin transaction
- SQL (0.3ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 201]]
- (2.4ms) commit transaction
- (0.0ms) begin transaction
- SQL (0.3ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 200]]
- (2.5ms) commit transaction
- (0.0ms) begin transaction
- SQL (0.2ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 199]]
- (3.4ms) commit transaction
- (0.1ms) begin transaction
- SQL (0.3ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 198]]
- (3.0ms) commit transaction
- (0.1ms) begin transaction
- SQL (0.2ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 196]]
- (2.4ms) commit transaction
- (0.0ms) begin transaction
- SQL (0.2ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 195]]
- (2.8ms) commit transaction
- (0.2ms) begin transaction
- SQL (0.4ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 194]]
- (8.2ms) commit transaction
- (0.1ms) begin transaction
- SQL (0.2ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 193]]
- (3.8ms) commit transaction
- (0.1ms) begin transaction
- SQL (0.2ms) DELETE FROM "microposts" WHERE "microposts"."id" = ? [["id", 192]]
- (2.7ms) commit transaction
- => [#<Micropost id: 202, to_guys: true, tag: nil, approved: nil, content: "lala", flag: nil, liked: nil, created_at: "2012-04-03 00:08:57", updated_at: "2012-04-03 00:08:57">, #<Micropost id: 201, to_guys: false, tag: nil, approved: nil, content: "ee", flag: nil, liked: nil, created_at: "2012-04-03 00:07:42", updated_at: "2012-04-03 00:07:42">, #<Micropost id: 200, to_guys: true, tag: nil, approved: nil, content: "ff", flag: nil, liked: nil, created_at: "2012-04-03 00:07:38", updated_at: "2012-04-03 00:07:38">, #<Micropost id: 199, to_guys: true, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-03 00:06:24", updated_at: "2012-04-03 00:06:24">, #<Micropost id: 198, to_guys: true, tag: nil, approved: nil, content: "ereaebaebrbuearbuoaebrrbearbuaebruabruaerbae aeruab...", flag: nil, liked: nil, created_at: "2012-04-03 00:04:48", updated_at: "2012-04-03 00:04:48">, #<Micropost id: 196, to_guys: true, tag: nil, approved: nil, content: "kungfu", flag: nil, liked: nil, created_at: "2012-04-03 00:04:27", updated_at: "2012-04-03 00:04:27">, #<Micropost id: 195, to_guys: true, tag: nil, approved: nil, content: "eararaer", flag: nil, liked: nil, created_at: "2012-04-03 00:03:13", updated_at: "2012-04-03 00:03:13">, #<Micropost id: 194, to_guys: true, tag: nil, approved: nil, content: "e", flag: nil, liked: nil, created_at: "2012-04-03 00:02:45", updated_at: "2012-04-03 00:02:45">, #<Micropost id: 193, to_guys: false, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-02 23:58:53", updated_at: "2012-04-02 23:58:53">, #<Micropost id: 192, to_guys: true, tag: nil, approved: nil, content: "", flag: nil, liked: nil, created_at: "2012-04-02 23:58:48", updated_at: "2012-04-02 23:58:48">]
- ruby-1.9.2-p180 :008 > Microspost.where(:id => (190..202).to_a).destroy_all
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement