I am applying Rails to an existing schema and not sure how much the
existing developers will let me go in and rename things. So I need to
discover the limits of what I can change with Rails.
I’ve found set_table_name and set_primary_key, which have been very
If I have a “foo has_one :bar” relationship, but then in the bar table
my column is named “fooid” or some other thing that is not “foo_id”, is
there a similar helper command I can use to change it? Everything’s
working swimmingly for me, except when I get to this bit and it errors
out telling me “cannot find bar.foo_id” and I can’t figure out a way to
point to bar.fooid and say “There it is.”
I tried googling around for “set foreign key constraint column name” but
can’t seem to track anything down.