Star rating in my simple-form Rails does not send the value

0

I'm using a JQuery plugin to style my input field with the "star rating" style, which is the library: link .

I call the attribute in the slim as follows:

td = f.input :score, label: false, input_html: {class: 'rating'}

And then the look looks like this:

AndmyHTMLgeneratedforthisformisasfollows:

<formnovalidate="novalidate" class="form-vertical edit_arquivo" id="edit_arquivo_1" action="/documentos/1/arquivos/1" accept-charset="UTF-8" method="post"></form>
<input name="utf8" type="hidden" value="✓">
<input type="hidden" name="_method" value="patch">
<input type="hidden" name="authenticity_token" value="HPAt+RG4IluAdpIhsNSdMw/tFQ2PF0CzIWUGhUwkZ+AXcyy0fZOLSW+EYMAkt1m56s+KMW25aEbce/MtfNjwwA==">
<tr>
   <td>
      <div class="form-group integer optional arquivo_score">
       <div class="controls">
         <div class="star-rating rating-xs rating-active">
           <div class="rating-container rating-gly-star" data-content="">
             <div class="rating-stars" data-content="" style="width: 80%;"></div>
               <input class="numeric integer optional rating form-control hide" type="number" step="1" name="arquivo[score]" id="arquivo_score"></div>
         </div>
       </div>
     </div>
   </td>
   <td>
    <input type="submit" name="commit" value="Atualizar Arquivo" class="btn btn-default btn btn-default btn-primary btn-large"/>
   </td>
</tr>

But for some reason I have no idea , the file_score parameter is not sent to my controller, as the package shows:

Started PATCH "/documentos/1/arquivos/1" for ::1 at 2015-02-20 17:18:53 -0300
Processing by ArquivosController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"wB2bfSO4VgQyZ+No4zu5OY8hYgsO7WWI1GzSJ9E05LDLnpowT5P/Ft2VEYl3WH2zagP9N+xDTX0pcieP4chzkA==", "arquivo"=>{"cancelado"=>"0", "observacao"=>""}, "commit"=>"Atualizar Arquivo", "documento_id"=>"1", "id"=>"1"}

Can anyone give me a glimpse of what's happening? What I noticed is that this field has a field called data-content , which the others do not have, but even so it should be passed some value, right?

    
asked by anonymous 20.02.2015 / 22:47

0 answers