This project is archived and is in readonly mode.
has_one :through on new record doesn't query for associated object
-
Alexey Ilyichev
Sorry for weird formatting. Code from previous post
class User < AR has_one :user_info has_many :bank_infos end
class UserInfo < AR belongs_to :user end
class BankInfo < AR belongs_to :user has_one :user_info, :through => :user end -
Jon Leighton
- State changed from new to invalid
- Importance changed from to Low
Hi there,
Thanks for the bug report. To do this you can use the
:inverse_ofoption on yourUser.has_many :bank_infos.Jon
-
Alexey Ilyichev
Hi, Jon.
Thanks for the reply. Inverse_of does not solve anything in this case.
-
Jon Leighton
Hi,
You're right, inverse_of is irrelevant here. However I have just tried the test case you provided against latest master and it passes.
Thanks
