Could this be a pluralization issue?
Did you set up your models as:

class Parent < ActiveRecord::Base
  has_many :children
end

class Parent < ActiveRecord::Base
  has_many :children
  belongs_to :parent
end

class Dog < ActiveRecord::Base
  has_many :dogs
  belongs_to :child
end

If so, then I would think that something like this might work:

parent = Parent.find(params[:parent_id])
child = parent.children.find(params[:child_id])
@record= child.dogs.build(params[:dog])

...but I am still very much a RoR neophyte.  Everything I know about
nested routes I learned from
http://akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial,
and I refer back to there each time I try to do it again.

--wpd

--~--~---------~--~----~------------~-------~--~----~
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