Hehe not a silly question, yes, I have, I also got a recommendation to 
try using the :inverse_of argument on the relationships too. Which 
didn't haven any effect on the problem.

I've come to the conclusion that accepts_nested_attributes_for works 
kinda like url_for... Where the presence of ID makes it assume the 
relationship exists. Rendering accepts_nested_attributes_for not 
suitable for what I want to do.

I've worked around this with a before filter:

def find_line_item_types
    params[:category][:line_item_types] = 
LineItemType.find(params[:category][:line_item_types].collect { |a| 
a[0].to_i }) if params[:category] and 
params[:category][:line_item_types]
  end

Thanks for replying! :)

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to