I have changed the primary key on a table “statuses” to now be
In my status model I have:
self.primary_key = 'entity_id'
when I try to render a collection of comments associated with a status
<%= render @comments %>
I get this error:
PG::UndefinedColumn: ERROR: column comments.status_id does not exist
LINE 1: SELECT "comments".* FROM "comments" WHERE "comments"."status_id"
I'm assuming when the above call is constructed by rails it is assuming
the table statuses has primary key status.id by convention..
so – is it no longer possible to use the render functionality as above?
Or have I missed something which I need to make this work?
How can I get rails to use entity_id instead of the now changed