nfelsen (owner)

Revisions

gist: 4533 Download_button fork
public
Public Clone URL: git://gist.github.com/4533.git
Embed All Files: show embed
Text only #
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
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
  PageView Columns (0.000863) SHOW FIELDS FROM `page_views` (pid:9950)
  SQL (0.000101) BEGIN (pid:9950)
  PageView Create (0.000295) INSERT INTO `page_views` (`updated_at`, `referer`, `user_agent`, `request_url`, `person_id`, `ip_address`, `created_at`) VALUES('2008-08-07 18:56:02', 'http://localhost:3000/admin/forums', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', '/admin/forums/22/edit', 1, '127.0.0.1', '2008-08-07 18:56:02') (pid:9950)
  SQL (0.006493) COMMIT (pid:9950)
  Person Columns (0.001871) SHOW FIELDS FROM `people` (pid:9950)
  Person Load (0.000403) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
  Analyzing Person Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   --------------------------------------------------------------------------------------------
   SIMPLE | 4 | const | | 1 | PRIMARY | 1 | people | const | PRIMARY
 (pid:9950)
  SQL (0.000108) BEGIN (pid:9950)
  SQL (0.000341) SELECT `email` FROM `people` WHERE (`people`.email = 'admin@example.com' AND `people`.id <> 1) (pid:9950)
  Analyzing
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ----------------------------------------------------------------------------------------------------------------------------------
   SIMPLE | | | Impossible WHERE noticed after reading const tables | 1 | | | | |
 (pid:9950)
  CACHE (0.000000) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
  Person Update (0.000337) UPDATE `people` SET `last_logged_in_at` = '2008-08-07 18:56:03', `updated_at` = '2008-08-07 18:56:03' WHERE `id` = 1 (pid:9950)
  SQL (0.029556) COMMIT (pid:9950)
  Preference Load (0.000127) SELECT * FROM `preferences` LIMIT 1 (pid:9950)
  Analyzing Preference Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ------------------------------------------------------------------------------------------
   SIMPLE | | ALL | | 1 | | 1 | preferences | |
 (pid:9950)
  Preference Columns (0.001005) SHOW FIELDS FROM `preferences` (pid:9950)
  Forum Columns (0.000784) SHOW FIELDS FROM `forums` (pid:9950)
  Forum Load (0.000114) SELECT * FROM `forums` WHERE (`forums`.`id` = 22) (pid:9950)
  Analyzing Forum Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   --------------------------------------------------------------------------------------------
   SIMPLE | 4 | const | | 1 | PRIMARY | 1 | forums | const | PRIMARY
 (pid:9950)
Rendering template within layouts/application (pid:9950)
Rendering admin/forums/edit (pid:9950)
  Section Columns (0.000790) SHOW FIELDS FROM `sections` (pid:9950)
  SQL (0.000122) SELECT count(*) AS count_all FROM `sections` WHERE (`sections`.forum_id = 22) (pid:9950)
  Analyzing
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ---------------------------------------------------------------------------------------------
   SIMPLE | | ALL | Using where | 1 | | 19 | sections | |
 (pid:9950)
  Section Load (0.000113) SELECT * FROM `sections` WHERE (`sections`.forum_id = 22) (pid:9950)
  Analyzing Section Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ---------------------------------------------------------------------------------------------
   SIMPLE | | ALL | Using where | 1 | | 19 | sections | |
 (pid:9950)
Rendered admin/forums/_section (0.00271) (pid:9950)
Rendered admin/forums/_section (0.00122) (pid:9950)
Rendered admin/forums/_section (0.00101) (pid:9950)
Rendered admin/forums/_section (0.00067) (pid:9950)
Rendered admin/forums/_fields (0.03700) (pid:9950)
  SQL (0.000100) SELECT count(*) AS count_all FROM `forums` (pid:9950)
  Analyzing
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ------------------------------------------------------------------------------------------------
   SIMPLE | 4 | index | Using index | 1 | | 2 | forums | | PRIMARY
 (pid:9950)
  CACHE (0.000000) SELECT count(*) AS count_all FROM `forums` (pid:9950)
  CACHE (0.000000) SELECT * FROM `preferences` LIMIT 1 (pid:9950)
Rendered shared/_debug (0.00975) (pid:9950)
Completed in 0.61599 (1 reqs/sec) | Rendering: 0.05867 (9%) | DB: 0.06360 (10%) | 200 OK [http://localhost/admin/forums/22/edit] (pid:9950)
 
 
Processing ForumsController#update (for 127.0.0.1 at 2008-08-07 18:56:09) [PUT] (pid:9950)
  Session ID: BAh7CDoMY3NyZl9pZCIlODE4YTViYWNkZTkyY2Q4MzE2ZTMyZWUyNjcyMzAz
ZTI6DnBlcnNvbl9pZGkGIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpG
bGFzaDo6Rmxhc2hIYXNoewc6CmVycm9yInBXYXJuaW5nOiB5b3VyIHBhc3N3
b3JkIGlzIHN0aWxsIHRoZSBkZWZhdWx0LgogICAgICAgICAgICA8YSBocmVm
PSIvcGVvcGxlLzEtYWRtaW4vZWRpdCI+Q2hhbmdlIGl0IGhlcmU8L2E+LjoL
bm90aWNlIgGAV2FybmluZzogeW91ciBlbWFpbCBhZGRyZXNzIGlzIHN0aWxs
IGF0IAogICAgICAgICAgICBleGFtcGxlLmNvbS4KICAgICAgICAgICAgPGEg
aHJlZj0iL3Blb3BsZS8xLWFkbWluL2VkaXQiPkNoYW5nZSBpdCBoZXJlPC9h
Pi4GOgpAdXNlZHsHOwhGOwlG--104a6bd36bc1b25b2553e5dc24ad77d48fc7738f (pid:9950)
  Parameters: {"commit"=>"Update", "forum"=>{"name"=>"a", "section_attributes"=>[{"name"=>"b", "should_destroy"=>"1", "id"=>"31"}, {"name"=>"c", "should_destroy"=>"1", "id"=>"32"}, {"name"=>"d", "should_destroy"=>"1", "id"=>"39"}], "description"=>"e"}, "authenticity_token"=>"a445848e5e259bce2556a48138b8c02b8bb395f7", "_method"=>"put", "action"=>"update", "id"=>"22", "controller"=>"admin/forums"} (pid:9950)
  PageView Columns (0.000834) SHOW FIELDS FROM `page_views` (pid:9950)
  SQL (0.000104) BEGIN (pid:9950)
  PageView Create (0.001364) INSERT INTO `page_views` (`updated_at`, `referer`, `user_agent`, `request_url`, `person_id`, `ip_address`, `created_at`) VALUES('2008-08-07 18:56:09', 'http://localhost:3000/admin/forums/22/edit', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', '/admin/forums/22', 1, '127.0.0.1', '2008-08-07 18:56:09') (pid:9950)
  SQL (0.005101) COMMIT (pid:9950)
  Person Columns (0.001190) SHOW FIELDS FROM `people` (pid:9950)
  Person Load (0.000408) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
  Analyzing Person Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   --------------------------------------------------------------------------------------------
   SIMPLE | 4 | const | | 1 | PRIMARY | 1 | people | const | PRIMARY
 (pid:9950)
  SQL (0.000134) BEGIN (pid:9950)
  SQL (0.000334) SELECT `email` FROM `people` WHERE (`people`.email = 'admin@example.com' AND `people`.id <> 1) (pid:9950)
  Analyzing
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ----------------------------------------------------------------------------------------------------------------------------------
   SIMPLE | | | Impossible WHERE noticed after reading const tables | 1 | | | | |
 (pid:9950)
  CACHE (0.000000) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
  Person Update (0.000351) UPDATE `people` SET `last_logged_in_at` = '2008-08-07 18:56:10', `updated_at` = '2008-08-07 18:56:10' WHERE `id` = 1 (pid:9950)
  SQL (0.003944) COMMIT (pid:9950)
  Preference Load (0.000131) SELECT * FROM `preferences` LIMIT 1 (pid:9950)
  Analyzing Preference Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ------------------------------------------------------------------------------------------
   SIMPLE | | ALL | | 1 | | 1 | preferences | |
 (pid:9950)
  Preference Columns (0.000855) SHOW FIELDS FROM `preferences` (pid:9950)
  Forum Columns (0.000928) SHOW FIELDS FROM `forums` (pid:9950)
  Forum Load (0.000087) SELECT * FROM `forums` WHERE (`forums`.`id` = 22) (pid:9950)
  Analyzing Forum Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   --------------------------------------------------------------------------------------------
   SIMPLE | 4 | const | | 1 | PRIMARY | 1 | forums | const | PRIMARY
 (pid:9950)
  Section Load (0.000118) SELECT * FROM `sections` WHERE (`sections`.forum_id = 22) (pid:9950)
  Analyzing Section Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ---------------------------------------------------------------------------------------------
   SIMPLE | | ALL | Using where | 1 | | 19 | sections | |
 (pid:9950)
  Section Columns (0.000783) SHOW FIELDS FROM `sections` (pid:9950)
WARNING: Can't mass-assign these protected attributes: id (pid:9950)
WARNING: Can't mass-assign these protected attributes: id (pid:9950)
WARNING: Can't mass-assign these protected attributes: id (pid:9950)
  SQL (0.000094) BEGIN (pid:9950)
  Section Destroy (0.000364) DELETE FROM `sections`
 WHERE `id` = 39
 (pid:9950)
  SQL (0.000416) COMMIT (pid:9950)
Redirected to http://localhost:3000/admin/forums (pid:9950)
Completed in 0.47786 (2 reqs/sec) | DB: 0.01897 (3%) | 302 Found [http://localhost/admin/forums/22] (pid:9950)
 
 
Processing ForumsController#index (for 127.0.0.1 at 2008-08-07 18:56:10) [GET] (pid:9950)
  Session ID: BAh7CDoMY3NyZl9pZCIlODE4YTViYWNkZTkyY2Q4MzE2ZTMyZWUyNjcyMzAz
ZTI6DnBlcnNvbl9pZGkGIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpG
bGFzaDo6Rmxhc2hIYXNoewc6CmVycm9yInBXYXJuaW5nOiB5b3VyIHBhc3N3
b3JkIGlzIHN0aWxsIHRoZSBkZWZhdWx0LgogICAgICAgICAgICA8YSBocmVm
PSIvcGVvcGxlLzEtYWRtaW4vZWRpdCI+Q2hhbmdlIGl0IGhlcmU8L2E+LjoL
bm90aWNlIiRGb3J1bSB3YXMgc3VjY2Vzc2Z1bGx5IHVwZGF0ZWQuBjoKQHVz
ZWR7BzsIRjsJRg==--aadf196e0b848b5594d31054dc5c7eba5e66a444 (pid:9950)
  Parameters: {"action"=>"index", "controller"=>"admin/forums"} (pid:9950)
  PageView Columns (0.003609) SHOW FIELDS FROM `page_views` (pid:9950)
  SQL (0.000109) BEGIN (pid:9950)
  PageView Create (0.000278) INSERT INTO `page_views` (`updated_at`, `referer`, `user_agent`, `request_url`, `person_id`, `ip_address`, `created_at`) VALUES('2008-08-07 18:56:10', 'http://localhost:3000/admin/forums/22/edit', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', '/admin/forums', 1, '127.0.0.1', '2008-08-07 18:56:10') (pid:9950)
  SQL (0.000335) COMMIT (pid:9950)
  Person Columns (0.001295) SHOW FIELDS FROM `people` (pid:9950)
  Person Load (0.000407) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
  Analyzing Person Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   --------------------------------------------------------------------------------------------
   SIMPLE | 4 | const | | 1 | PRIMARY | 1 | people | const | PRIMARY
 (pid:9950)
  SQL (0.000105) BEGIN (pid:9950)
  SQL (0.000304) SELECT `email` FROM `people` WHERE (`people`.email = 'admin@example.com' AND `people`.id <> 1) (pid:9950)
  Analyzing
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ----------------------------------------------------------------------------------------------------------------------------------
   SIMPLE | | | Impossible WHERE noticed after reading const tables | 1 | | | | |
 (pid:9950)
  CACHE (0.000000) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
  Person Update (0.000347) UPDATE `people` SET `last_logged_in_at` = '2008-08-07 18:56:11', `updated_at` = '2008-08-07 18:56:11' WHERE `id` = 1 (pid:9950)
  SQL (0.003612) COMMIT (pid:9950)
  Preference Load (0.000145) SELECT * FROM `preferences` LIMIT 1 (pid:9950)
  Analyzing Preference Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ------------------------------------------------------------------------------------------
   SIMPLE | | ALL | | 1 | | 1 | preferences | |
 (pid:9950)
  Preference Columns (0.000847) SHOW FIELDS FROM `preferences` (pid:9950)
  Forum Load (0.000124) SELECT * FROM `forums` (pid:9950)
  Analyzing Forum Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   -------------------------------------------------------------------------------------
   SIMPLE | | ALL | | 1 | | 2 | forums | |
 (pid:9950)
Rendering template within layouts/application (pid:9950)
Rendering admin/forums/index (pid:9950)
  Forum Columns (0.001898) SHOW FIELDS FROM `forums` (pid:9950)
  SQL (0.000097) SELECT count(*) AS count_all FROM `forums` (pid:9950)
  Analyzing
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ------------------------------------------------------------------------------------------------
   SIMPLE | 4 | index | Using index | 1 | | 2 | forums | | PRIMARY
 (pid:9950)
  CACHE (0.000000) SELECT count(*) AS count_all FROM `forums` (pid:9950)
  CACHE (0.000000) SELECT * FROM `preferences` LIMIT 1 (pid:9950)
Rendered shared/_debug (0.00818) (pid:9950)
Completed in 0.44869 (2 reqs/sec) | Rendering: 0.02124 (4%) | DB: 0.01457 (3%) | 200 OK [http://localhost/admin/forums] (pid:9950)
 
 
Processing ForumsController#edit (for 127.0.0.1 at 2008-08-07 18:56:15) [GET] (pid:9950)
  Session ID: BAh7CDoMY3NyZl9pZCIlODE4YTViYWNkZTkyY2Q4MzE2ZTMyZWUyNjcyMzAz
ZTI6DnBlcnNvbl9pZGkGIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpG
bGFzaDo6Rmxhc2hIYXNoewc6CmVycm9yInBXYXJuaW5nOiB5b3VyIHBhc3N3
b3JkIGlzIHN0aWxsIHRoZSBkZWZhdWx0LgogICAgICAgICAgICA8YSBocmVm
PSIvcGVvcGxlLzEtYWRtaW4vZWRpdCI+Q2hhbmdlIGl0IGhlcmU8L2E+LjoL
bm90aWNlIgGAV2FybmluZzogeW91ciBlbWFpbCBhZGRyZXNzIGlzIHN0aWxs
IGF0IAogICAgICAgICAgICBleGFtcGxlLmNvbS4KICAgICAgICAgICAgPGEg
aHJlZj0iL3Blb3BsZS8xLWFkbWluL2VkaXQiPkNoYW5nZSBpdCBoZXJlPC9h
Pi4GOgpAdXNlZHsHOwhGOwlG--104a6bd36bc1b25b2553e5dc24ad77d48fc7738f (pid:9950)
  Parameters: {"action"=>"edit", "id"=>"22", "controller"=>"admin/forums"} (pid:9950)
  PageView Columns (0.000837) SHOW FIELDS FROM `page_views` (pid:9950)
  SQL (0.000104) BEGIN (pid:9950)
  PageView Create (0.000297) INSERT INTO `page_views` (`updated_at`, `referer`, `user_agent`, `request_url`, `person_id`, `ip_address`, `created_at`) VALUES('2008-08-07 18:56:15', 'http://localhost:3000/admin/forums', 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1', '/admin/forums/22/edit', 1, '127.0.0.1', '2008-08-07 18:56:15') (pid:9950)
  SQL (0.005508) COMMIT (pid:9950)
  Person Columns (0.001421) SHOW FIELDS FROM `people` (pid:9950)
  Person Load (0.000385) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
  Analyzing Person Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   --------------------------------------------------------------------------------------------
   SIMPLE | 4 | const | | 1 | PRIMARY | 1 | people | const | PRIMARY
 (pid:9950)
  SQL (0.000107) BEGIN (pid:9950)
  SQL (0.000345) SELECT `email` FROM `people` WHERE (`people`.email = 'admin@example.com' AND `people`.id <> 1) (pid:9950)
  Analyzing
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ----------------------------------------------------------------------------------------------------------------------------------
   SIMPLE | | | Impossible WHERE noticed after reading const tables | 1 | | | | |
 (pid:9950)
  CACHE (0.000000) SELECT * FROM `people` WHERE (`people`.`id` = 1) (pid:9950)
  Person Update (0.000343) UPDATE `people` SET `last_logged_in_at` = '2008-08-07 18:56:15', `updated_at` = '2008-08-07 18:56:15' WHERE `id` = 1 (pid:9950)
  SQL (0.000335) COMMIT (pid:9950)
  Preference Load (0.000122) SELECT * FROM `preferences` LIMIT 1 (pid:9950)
  Analyzing Preference Load
   select_type | key_len | type | Extra | id | possible_keys | rows | table | ref | key
   ------------------------------------------------------------------------------------------
   SIMPLE | | ALL | | 1 | | 1 | preferences | |
 (pid:9950)
  Preference Columns (0.000864) SHOW FIELDS FROM `preferences` (pid:9950)