title: Excel like javascript editing in RoR
body: <p><strong>What i have:</strong> A table generated by single cells of values like:</p>
  
  <pre><code>&lt;tr&gt;
    &lt;%= render :partial =&gt; 'partials/fieldtypes/show_in_table', :locals =&gt; {:fieldtype =&gt; 'textline', :data =&gt; {'object' =&gt; object, 'value' =&gt; 'name'}, :vars =&gt; {'textline' =&gt; object.name}} %&gt;
    &lt;%= render :partial...
  &lt;/tr&gt;
  </code></pre>
  
  <p>The partial looks like this:</p>
  
  <pre><code>&lt;td class='tablecell' &lt;% data.each do |dat| %&gt;data-&lt;%= raw(dat[0]) %&gt;='&lt;%= raw(dat[1]) %&gt;' &lt;% end %&gt; &gt;
    &lt;%= render :partial =&gt; 'partials/fieldtypes/show/'+fieldtype, :locals =&gt; {:vars =&gt; vars} %&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>Now i want to edit single entries/cells of that table like in MS Excel by doubleclicking on them.
  The site is running on full javascript, so pages are not being linked.</p>
  
  <p><strong>So what i want is:</strong> Generating (<strong>not prerendering and switching visibility!</strong>) a form everytime the user wants to edit a field (by doubleclicking).</p>
  
  <p><strong>My ideas so far:</strong> As you can see i was trying to store all the necessary data in html5 data-tags to generate the form. The plan was to call a controller action everytime a cell is doubleclicked and to generate the form with the database connection with rails.</p>
  
  <p><strong>Problem/Question:</strong> Does this work that way? Because the data in the tags looks converted and useless for further interaction. And if it works: How do i create a controller action for that with a proper route?</p>
  
  <p>Or are there any easier solutions? As stated i do not want to render the form hidden directly!</p>