Commit 092cb0bb authored by Robert Hunt's avatar Robert Hunt

Add new primary key example to docs

The docs were missing the requirement to add the primary key to the
model
parent 0f9003c7
...@@ -87,3 +87,13 @@ create_table :user_configs, id: false do |t| ...@@ -87,3 +87,13 @@ create_table :user_configs, id: false do |t|
... ...
end end
``` ```
You will also need to add the new primary key to the model:
```ruby
class UserConfig < ActiveRecord::Base
self.primary_key = :user_id
belongs_to :user
end
```
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment