I have 2 buttons and each one will have to send a value of the model and will also be submit
button 1 and button 2 - depending on the button I click it will send the value to the field @ evaluation.type. Similar to a like and dislike . The possible code I imagine should be in view in helper form_for
[button 1]:
<%= form_for(@avaliacao) do |f| %>
<%= render 'compartilhado/mensagens_erro', object: f.object %>
<%= f.hidden_field :item_id %>
<div class="field">
<%= f.text_area :avaliacao, placeholder: "Escreva seu Comentario..." %>
</div>
<!-- Seria isso no f.submit?? -->
<div class="col-md-4.5 col-md-offset-8">
<%= f.submit "Avaliar!", class: "btn btn-large btn-primary" %
</div>
<% end %>