I couldn't get it to work like I described above. I did get the
desired result by this code in model_a:

Model_a.rb

class ModelA < AR::Base
...

has_many :model_bs, :dependent => :destroy

def after_create
  Model_b.create(:name => "Default Name", :model_a_id => id)
end

...

Which feels like a hack, particularly since I'm passing the model_a
id. I'm sure there is a better way to do this but everything else I
tried failed. If anyone has any pointers, I'm open to learning.
-Sorry for the typos in the first message, iPhones are not great for
posting to forums :/


On Mar 23, 2:21 pm, kevinpfromnm <[email protected]> wrote:
> that should work once you add your create_model_b method.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to