<div dir="ltr">Hi All,<div><br></div><div>This should be fixed now. This is what was happening: $('#codes').attr('value') gives the default value of an element and $('#codes').val() gives the current value. The default value was empty, so none of the codes were getting assigned when the user selected a value.</div>
<div><br></div><div style>-Ed</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 13, 2013 at 9:18 AM, pablo rey <span dir="ltr"><<a href="mailto:pablo@basurama.org" target="_blank">pablo@basurama.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div>Great to see that we are moving forward with the multiple area selection! I share with you some bugs, to see if you can reproduce them.</div>
<div><br><div>After I updated Ed's yesterday commits, I get the following errors. [I dumped the old data base and started from scratch].<div>
<br></div><div>I could create a thread. I coded, and although the areas were created, they were transparent. After saving and display I got: </div></div><div><br></div><div><br></div><div><b>ActiveRecord::RecordNotFound in CodingController#process_highlighted_areas</b><pre style="background-color:rgb(238,238,238);padding:10px;font-size:11px;white-space:pre-wrap;color:rgb(51,51,51);line-height:18px">
Couldn't find Code with id=</pre><p style="font-family:helvetica,verdana,arial,sans-serif;font-size:13px;line-height:18px;color:rgb(51,51,51)"><code>Rails.root: /home/pablo/sites/pageonex</code></p><div><a href="http://localhost:3000/pablo/qwer_qwer_qwer/process_highlighted_areas#" style="color:rgb(102,102,102);font-family:helvetica,verdana,arial,sans-serif;font-size:13px;line-height:18px" target="_blank">Application Trace</a><font color="#333333" face="helvetica, verdana, arial, sans-serif"><span style="line-height:18px"> | </span></font><a href="http://localhost:3000/pablo/qwer_qwer_qwer/process_highlighted_areas#" style="color:rgb(102,102,102);font-family:helvetica,verdana,arial,sans-serif;font-size:13px;line-height:18px" target="_blank">Framework Trace</a><font color="#333333" face="helvetica, verdana, arial, sans-serif"><span style="line-height:18px"> | </span></font><a href="http://localhost:3000/pablo/qwer_qwer_qwer/process_highlighted_areas#" style="color:rgb(102,102,102);font-family:helvetica,verdana,arial,sans-serif;font-size:13px;line-height:18px" target="_blank">Full Trace</a><div>
<pre style="color:rgb(51,51,51);font-family:helvetica,verdana,arial,sans-serif;font-size:11px;line-height:18px;background-color:rgb(238,238,238);padding:10px;white-space:pre-wrap"><code>app/controllers/coding_controller.rb:50:in `block in process_highlighted_areas'
app/controllers/coding_controller.rb:46:in `each'
app/controllers/coding_controller.rb:46:in `process_highlighted_areas'</code></pre><div><br></div><div>In the parameters (I highlight in yellow):</div><div>
<pre style="padding:10px;font-size:11px;white-space:pre-wrap;color:rgb(51,51,51);line-height:18px"><span style="background-color:rgb(238,238,238)">... "ha_name"=>["manila_standard_today-01-03-2013_1"],
"img_id_manila_standard_today-01-03-2013_1"=>"manila_standard_today-01-03-2013",
"id_manila_standard_today-01-03-2013_1"=>"0",
</span><span style="background-color:rgb(255,255,0)"> "code_id_manila_standard_today-01-03-2013_1"=>"",</span><span style="background-color:rgb(238,238,238)">
"x1_manila_standard_today-01-03-2013_1"=>"164",
"y1_manila_standard_today-01-03-2013_1"=>"152",
"x2_manila_standard_today-01-03-2013_1"=>"494",
"y2_manila_standard_today-01-03-2013_1"=>"481",
"width_manila_standard_today-01-03-2013_1"=>"330",
"height_manila_standard_today-01-03-2013_1"=>"329",
</span><span style="background-color:rgb(255,255,0)"> "deleted_manila_standard_today-01-03-2013_1"=>"",</span><span style="background-color:rgb(238,238,238)">
"commit"=>"Save and Display",
"username"=>"pablo",
"thread_name"=>"zxvc"}</span></pre></div><div><br></div><br>-----------------</div><div><br></div><div>From the thread index, when I open a thread I get:</div>
<div><br></div><div><b>NoMethodError in CodingController#display</b><pre style="background-color:rgb(238,238,238);padding:10px;font-size:11px;white-space:pre-wrap;color:rgb(51,51,51);line-height:18px">undefined method `<<' for nil:NilClass</pre>
<p style="font-family:helvetica,verdana,arial,sans-serif;font-size:13px;line-height:18px;color:rgb(51,51,51)"><code>Rails.root: /home/pablo/sites/pageonex</code></p><div style="color:rgb(51,51,51);font-family:helvetica,verdana,arial,sans-serif;font-size:13px;line-height:18px">
<a href="http://localhost:3000/pablo/qwer_qwer_qwer/#" style="color:rgb(102,102,102)" target="_blank">Application Trace</a> | <a href="http://localhost:3000/pablo/qwer_qwer_qwer/#" style="color:rgb(102,102,102)" target="_blank">Framework Trace</a> | <a href="http://localhost:3000/pablo/qwer_qwer_qwer/#" style="color:rgb(102,102,102)" target="_blank">Full Trace</a><div>
<pre style="background-color:rgb(238,238,238);padding:10px;font-size:11px;white-space:pre-wrap"><code>app/controllers/coding_controller.rb:154:in `block in display'
app/controllers/coding_controller.rb:148:in `each'
app/controllers/coding_controller.rb:148:in `display'</code></pre></div></div><h2 style="color:rgb(51,51,51);font-family:helvetica,verdana,arial,sans-serif;line-height:18px;margin-top:30px">Request</h2><p style="font-family:helvetica,verdana,arial,sans-serif;font-size:13px;line-height:18px;color:rgb(51,51,51)">
<b>Parameters</b>:</p><pre style="background-color:rgb(238,238,238);padding:10px;font-size:11px;white-space:pre-wrap;color:rgb(51,51,51);line-height:18px">{"username"=>"pablo",
"thread_name"=>"qwer_qwer_qwer"}</pre><br></div></div></div></div></div>
<br>_______________________________________________<br>
Pageonexdev mailing list<br>
<a href="mailto:Pageonexdev@mit.edu">Pageonexdev@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/pageonexdev" target="_blank">http://mailman.mit.edu/mailman/listinfo/pageonexdev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Edward L. Platt<br></div><div>Civic Technology Programmer</div><div>MIT Center for Civic Media</div><div>E15-348</div><div><a href="http://civic.mit.edu" target="_blank">http://civic.mit.edu</a></div>
<div><a href="http://elplatt.com" target="_blank">http://elplatt.com</a></div><div><a href="http://twitter.com/edwardlplatt" target="_blank">@EdwardLPlatt</a></div>
</div>