0 and trying to use the cacoon gem for my nested form. I have installed the gem and dependencies as per the instructions and restarted the server.
I have two models: Contacts and Goals. A contact has_many goals, and a contact accepts_nested_attributes_for goals. The nested_attributes work fine, the problem is in the cacoon setup.
When I load the form (either using contacts#new or #edit action):
undefined method `done' for #<Goal:0x00000103b18790>
Below is the Contacts/Goal form:
<%= simple_form_for(@contact) do |f| %>
<% if @contact.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@contact.errors.count, "error") %> prohibited this contact from being saved:</h2>
<ul>
<% @contact.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<%= f.input :name %>
<%= f.input :title %>
<%= f.input :company %>
<%= f.input :email %>
<%= f.input :notes %>
<h3>Goals:</h3>
<%= f.simple_fields_for(:goals) do |goal| %>
<%= render 'goal_fields', :f => goal %>
<%= link_to_add_association 'add goal', f, :goals %>
<%= f.submit :submit %>
<% end %>
<% end %>
and the partial being rendered:
<%= f.input :title %>
<%= f.input :due_date %>
<%= f.input :notes %>
<%= f.input :done, :as => :boolean %>
<%= link_to_remove_association "remove goal", f %>
Here's a link to the project: https://github.com/nowgeez/radiusapp
Any ideas? Thanks in advance!