title: Rails - Turning multiple HTML inputs' contents into a single string
body: <p><strong>0. Essentials</strong></p>
  
  <p>Using a Rails form and inputs, how do you concatenate a large number of text inputs into one string attribute?</p>
  
  <p>e.g. "A" , "B", "C" are each inputs in a Rails form and they are to be concatenated and read in as <code>:string_field =&gt; "ABC"</code></p>
  
  <p><strong>1. Background</strong></p>
  
  <p>I'm making an application that allows user to make their own crossword puzzles. The puzzles are members of my CrosswordPuzzle class, in which the <code>:letters</code> attribute (a string) describes the layout of letters and black spaces in the puzzle.</p>
  
  <p>For example, a 3x3 puzzle as follows...</p>
  
  <pre><code>FOO
  O■U
  BAR
  </code></pre>
  
  <p>... should have a <code>:letters</code> attribute of <code>"FOOO_UBAR"</code> (the string represents the puzzle read left to right, top to bottom).</p>
  
  <p><strong>2. Problem</strong></p>
  
  <p>Users create a puzzle by first specifying a size for the puzzle (row x col). This creates a blank puzzle of that size, with each cell being a blank HTML input element. Users can then type the appropriate letters into the blank cells and construct their puzzle. </p>
  
  <p>What I don't understand how to do is take all of these separate single-character inputs and have Rails interpret them or change them into a single <code>:letters</code> attribute of the puzzle when I submit the edit form. Also, because the puzzles may be of varying sizes with varying numbers of cells, the answer needs to be scalable such that 100-600 input elements can be read into the single 100-600 character string.</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>P.S. As this is my first post on StackOverflow I apologize in advance if I've made any mistakes. (I checked extensively before to see if similar topics had been covered, but they either haven't or I'm too unfamiliar with the terminology to recognize them)</p>