title: Is there a way to set a distinct ID and name for a text_field in Rails 2?
body: <p>I've got a Rails 2 site I'm trying to add a form handler to, but I'm running into problems converting the html form fields into form handler fields.  </p>
  
  <p>The form code begins with:</p>
  
  <pre><code>    &lt;% form_for @newsavedmap, :html=&gt;{:id=&gt;'createaMap'} do |f| %&gt;
  </code></pre>
  
  <p>I keep getting errors when I try things like </p>
  
  <pre><code>    &lt;%= text_field :newsavedmap, :html=&gt;{ :value =&gt; 'New Map', :name=&gt;'newsavedmapname', :id=&gt; 'savedmap_name', :size =&gt; '30' } %&gt;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>    ActionView::TemplateError (wrong number of arguments (1 for 2)) on line #284 of app/views/layouts/maptry.html.erb:
  </code></pre>
  
  <p>Here are the fields. How can I convert these to form handler fields in Rails 2? </p>
  
  <pre><code>    &lt;input id="savemap_name" name="newsavedmapname" size="30" type="text" value="New Map"&gt;&lt;/p&gt;
  
      &lt;select id="startdrop" name="startthere"&gt;
      &lt;OPTIONS HERE&gt;
      &lt;/select&gt;
  
      &lt;select multiple id="waypoints" class="mobile-waypoints-remove" name="waypointsselected[]"&gt;
      &lt;OPTIONS HERE&gt;
      &lt;/select&gt;
  </code></pre>
  
  <p>Thanks for any help you can provide!</p>
  
  <p><strong>Edit 1 Error Code for the Text_Field</strong></p>
  
  <p>Using Bigxiang's approach, I get</p>
  
  <pre><code>    Processing NewsavedmapsController#create (for IP at Date Time) [POST]
      Parameters: {"endhere"=&gt;"", "endthere"=&gt;"SAMPLE ADDRESS 1", "newsavedmap"=&gt;{"newsavedmapname"=&gt;"test Map"}, "startthere"=&gt;"SAMPLE ADDRESS 2", "starthere"=&gt;"", "optimize"=&gt;"on"}
  
      ActiveRecord::UnknownAttributeError (unknown attribute: newsavedmapname)
  </code></pre>
  
  <p>The line with "newsavedmap"=>{"newsavedmapname"=>"test Map"} should just read </p>
  
  <pre><code>    "newsavedmapname"=&gt;"test Map"
  </code></pre>
  
  <p>How can I do this? My controller starts with:</p>
  
  <pre><code>    def create
  
      @newsavedmap = Newsavedmap.new(params[:newsavedmap])
      @newsavedmap.name = params[:newsavedmapname]
  </code></pre>