To follow-up, this works fine with test fixtures.  It also works fine
if I do things in a slightly different order:

user=User.new
user.build_membership
user.membership.build_role
user.save!

When I do this, user.role no longer returns nil, it returns the role
as expected.  I think things weren't cached quite right, and for
whatever reason I couldn't force a proper reload.  Maybe a bug in
rails?


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