I need to use in_place_checkbox. I have tried the inplacecontrols
plugin, but it is not working. Here is my code (some of it is dutch, in
case you’re wondering):
Verwerken rekeningen
<%= start_form_tag({:action => "get_invoices"}, :id => "entry-form") %>Maand
<%= select_year(Date.today,
:start_year => Schoolyear.get_startdate.year,
:end_year => Schoolyear.get_enddate.year)%>
<%= select_month(Date.today)%>
<%=
Parent.human_attribute_name("payment")%>
<%= select(:parent, :payment, %w{ 6 2 1}) %>
<%= observe_form “entry-form”,
:frequency => 0.5,
:update => “live-preview”,
:url => { :action => “get_invoices” } %>
That calls get_invoices (notice the observe_form part):
<% if @invoices.empty? %>
Geen rekeningen gevonden. Selecteer een andere groep of maand.
<% else %>Naam | Betaald |
---|---|
<%= invoice.parent.fullname %> | <%= in_place_checkbox(:invoice, :paid, :checked => true, :unchecked => false) %> |
A checkbox is shown in the view, but it is not working.
Does anybody knows what is wrong? Or does anybody have a solution that
is actually working?