Solved it! Thanks to a good friend :)

For those who have similar issues, look into the 
accepts_nested_attributes_for :your_object

it works wonders!

 class Person < ActiveRecord::Base
    has_many :projects
    accepts_nested_attributes_for :projects
  end


 <% form_for @person, :url => { :action => "update" } do |person_form| 
%>
    ...
    <% person_form.fields_for :projects do |project_fields| %>
      Delete: <%= project_fields.check_box :_delete %>
    <% end %>
  <% end %>

fields_for is an iterator too apparently, so you don't need to run 
through a for loop with the fields_for inside it.
-- 
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