开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜