title: Saving json response in create
body: <p>I want to save a json response but it is saving the title instead of the value.  Also having issues with how the params are coming through with slashes instead of as a hash</p>
  
  <p>I have the following response from form submit:</p>
  
  <pre><code>Parameters: {"utf8"=&gt;"✓", "authenticity_token"=&gt;"2134", "shipping_rate"=&gt;{..."shipping_rate"=&gt;"{\"serviceName\"=&gt;\"USPS First Class Mail - Package\", \"serviceCode\"=&gt;\"usps_first_class_mail\", \"shipmentCost\"=&gt;2.66, \"otherCost\"=&gt;0.0}"}, "commit"=&gt;"Create Shipping rate"}
  </code></pre>
  
  <p><strong>form:</strong></p>
  
  <pre><code>...
  &lt;% @rates.each do |rate| %&gt;
    &lt;%= form.radio_button :shipping_rate, rate.as_json %&gt; &lt;%= rate %&gt;&lt;br /&gt;
  &lt;% end %&gt;
  ...
  </code></pre>
  
  <p>I am under the impression using <code>as_json</code> removes the "/" so it comes through as a hash parameters.</p>
  
  <p>I also tried using <code>@rates.as_json.each</code> with same results</p>
  
  <p><strong>Create</strong> method in controller:</p>
  
  <pre><code>@shipping_rate.service_code = params["shipping_rate"]["shipping_rate"]["serviceCode"]
  </code></pre>
  
  <p>How the service_code saves is as "serviceCode" and not "usps_first_class_mail".</p>
  
  <p>How can I:</p>
  
  <ol>
  <li>Have the params come through as a hash, without the <code>/</code>'s</li>
  <li>Save the value of <code>params["shipping_rate"]["shipping_rate"]["serviceCode"]</code> instead of the title</li>
  </ol>