Why isn't the composite_primary_keys gem for Rails working?
I've followed the instructions here, installing the composite_primary_keys gem via
sudo gem install composite_primary_keys
That worked fine. Now when I add the following to my model
set_primary_keys :user_id, :group_id
and I get
undefined method `set_primary_keys' for #<Class:0x1043bfe20>
Also, using multiple primary keys in a migration as described here has no effect.
An开发者_如何学JAVAy ideas why this might not be working and how to make it work?
Note: I do not want a speech on why I should not be using composite keys--I have already made up my mind and just want to get this working. Thanks!
Did you add require 'composite_primary_keys'
to the bottom of your environment.rb
file as described here?
精彩评论