0

faced with the problem, the best_in_place bypasses optimistic record locking, just keeps on top of the new value. How can I fix this?

Alexander
  • 103
  • 6

1 Answers1

1

Had the same problem.

I have some best_in_place fields within a form and I added a hidden field named lock_version and it seems to work.

<%= form_for(commission, :remote => true) do |f| %>
   <%= best_in_place commission, :commission_MA if admin? %>
   <%= f.hidden_field :lock_version %>
<% end %>

Hope that solves the problem for you as well.