I’ve got an issue where i have a search page that passes a field which
is then used as the criteria of the search. Problem is, I’ve set an AR
has_many relationship in the model that joins one table to another -
both tables have the same column name I’m searching on, so naturally I
get an ambiguous error in sql - it doesnt know which column to apply the
One solution would be to append the desired table name to the field
being passed on in search, like my_database.foo where foo was the
ambiguous field. But this doesn’t seem very Rails-ish to my newbie eyes.
Is there a better, AR-based way to handle this issue?
Peter D Bethke