Hello,

I'm trying create a simple check_box that if checked include a
hidden_field, but I haven't success.

Something like this:
    <p class="field"></p>
    <%=  check_box_tag(:patrono, value = "1", checked = false, options =
{}) %>
    <%= f.label "Patrono" %>
    <% if :patrono.checked == true %>
      <%= f.hidden_field "tipo_componente_ids][", { :id =>
"tipo_componente_ids", :value => @patrono.id } %>
    <% end %>
    <p/>

Thanks for help!

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to