Composite Primary Keys in Rails still being ignored

Viewed 2545

I've set up a database that has composite primary keys for Ruby on Rails. Creating the migration works, but when I start to seed the database, I still get a warning that "Active Record does not support primary keys." and that the "Composite primary key is ignored." even after I've installed the composite_primary_keys gem, and included require 'composite_primary_keys' into the environments.rb file.

Any thoughts as to why the composite primary key is still ignored?

1 Answers

Well, I found the work-around to this. For every model that I had that has composite primary keys, I included require 'composite_primary_keys' on the start of the class. Seems to work for me.

Related