-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup model association #3
Conversation
spec/dummy_app/app/models/guitar.rb
Outdated
class Guitar < ApplicationRecord | ||
belongs_to :person | ||
has_many :guitar_parts | ||
|
||
# just imagine if rails would be like this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the lines below (35-42) are like doing a has_many :irontrail_changes
but uglier. This is still quite WIP
|
||
# branch ref is 'Rails8Support' | ||
# pg_party trunk needs Rails < 8.0, so let's use https://github.com/rkrage/pg_party/pull/86 | ||
gem 'pg_party', github: 'AlexKovynev/pg_party', ref: 'Rails8Support' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit): this is the kind of thing that we'll forget
Jira FND-3301
This PR sets up some way to get association working with ActiveRecord.
Ideally it'd be as easy as doing a
has_many :irontrail_changes