Skip to content
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

Merged
merged 9 commits into from
Nov 22, 2024
Merged

Setup model association #3

merged 9 commits into from
Nov 22, 2024

Conversation

andrepiske
Copy link
Collaborator

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

@andrepiske andrepiske changed the title Setup model association [WIP] Setup model association Nov 15, 2024
class Guitar < ApplicationRecord
belongs_to :person
has_many :guitar_parts

# just imagine if rails would be like this!
Copy link
Collaborator Author

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

@andrepiske andrepiske marked this pull request as ready for review November 22, 2024 12:56
@andrepiske andrepiske changed the title [WIP] Setup model association Setup model association Nov 22, 2024

# 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'
Copy link
Member

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

@andrepiske andrepiske merged commit 763a3dc into dev Nov 22, 2024
7 checks passed
@andrepiske andrepiske deleted the dev-association branch November 22, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants