Forum: Ruby on Rails problem with in_place_checkbox

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1ea02617a34572843fefc379c484322d?d=identicon&s=25 oomtuinstoel (Guest)
on 2007-01-19 16:31
(Received via mailing list)
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):

<h1>Verwerken rekeningen</h1>
<%= start_form_tag({:action => "get_invoices"}, :id => "entry-form") %>
  <p><label for="invoice_month">Maand</label><br/>
  <%= select_year(,
                  :start_year => Schoolyear.get_startdate.year,
                  :end_year => Schoolyear.get_enddate.year)%>
  <%= select_month(></p>

  <p><label for="parent_payment"><%=
  <%= select(:parent, :payment, %w{ 6 2 1}) %></p>
<%= end_form_tag %>

<%= observe_form "entry-form",
  :frequency => 0.5,
  :update => "live-preview",
  :url => { :action => "get_invoices" } %>

<div id="live-preview"></div>

That calls get_invoices (notice the observe_form part):

<% if @invoices.empty? %>
  <p>Geen rekeningen gevonden. Selecteer een andere groep of maand.</p>
<% else %>
   <% @invoices.each do |invoice| %>
    <% next if invoice.total_amount == 0 %>
    <% @invoice = invoice %>
      <td><%= invoice.parent.fullname %></td>
      <td><%= in_place_checkbox(:invoice, :paid, :checked => true,
:unchecked => false) %></td>
  <% end %>
<% end %>

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?
This topic is locked and can not be replied to.