I'm looking for advice here:
I have two tables in legacy scheme, A
and B
, joined on A.somename = B.othername
. Both of those columns are strings. So how do I set up relations between them in rails (v2.1.0)? Given that A
has many B
's, what would be the best practice:
use
:finder_sql
and just write a SQL select,configure the relation through other parameters (how? I know I can set
:foreign_key = 'othername'
, but that will just try to set up aA.id = B.othername
relation - what can I do to set up the correct one?),something else that has not crossed my mind.
So, what would you suggest?