title: Rails error: can't convert Symbol into Integer
body: <p>Using the google maps API and rails 3.2.1 I have page allowing to move the business marker on a map to correct it's position. The business model has latitude and longitude (amongst others). The relevant part is:</p>
  
  <pre><code>&lt;%= form_for :business, :url =&gt; { :action =&gt; "updatemap" }, :id =&gt; 'updatebutton' do |f| %&gt;
    &lt;%= f.hidden_field :latitude %&gt;
    &lt;%= f.hidden_field :longitude %&gt;
    &lt;br /&gt;
    &lt;%= f.submit "Save"  %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>The method updatemap is:</p>
  
  <pre><code>def updatemap
    @business = Business.find(params[:id])
    @business.latitude = params([:business][:latitude])
    @business.longitude = params([:business][:longitude])
    if @business.save!
      redirect_to business_path(@business), :flash =&gt; { :success =&gt; "The business was updated!" }
    else
      render 'changemap', :flash =&gt; { :error =&gt; "An error occured." }
    end
  end
  </code></pre>
  
  <p>Running the debugger, params([:business][:latitude]) and params([:business][:longitude]) give the correct value of the new map coordinates (e.g. "45.273739" for latitude). But there is an error:</p>
  
  <p>TypeError in BusinessesController#updatemap
  can't convert Symbol into Integer
  (the line of the error is the @business.latitude = params([:business][:latitude]) line)</p>
  
  <p>I also tried with</p>
  
  <pre><code>...
  if @business.update_attributes(params[:business])
  ...
  </code></pre>
  
  <p>but the error is the same. What causes the error and how can I correct it?</p>