mercredi 15 novembre 2017

Rails 3 association between two same name models

I have two rails models. The Class name of both models is A, but one model is inside a module Manage.

a) Class Manage :: A

b) Class A

I want to create a one-to-one relation between these two tables. When I add

belongs_to: A 

in Class Manage :: A, rails associates it with the same class.

How do I add association between these two models? I have searched a lot but haven't found anything yet.

Aucun commentaire:

Enregistrer un commentaire