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

Facilitate an ApplicationRecord::AssociatedObject #28

Closed
wants to merge 2 commits into from

Conversation

kaspth
Copy link
Owner

@kaspth kaspth commented Dec 10, 2024

Lets you define an abstract to share any common behavior you may need among Associated Objects:

# app/models/application_record/associated_object.rb
class ApplicationRecord::AssociatedObject < ActiveRecord::AssociatedObject
end

I don't know what that common behavior may be yet, but I figure it's a good idea to expose.

@kaspth kaspth self-assigned this Dec 10, 2024
@kaspth kaspth force-pushed the facilitate-application_record-associated_object branch from 3815097 to 18e6f2e Compare December 10, 2024 14:02
@kaspth
Copy link
Owner Author

kaspth commented Dec 10, 2024

Hmm, this has issues with the extension block, where we may need to support that in the parent class — but we can't because it's not associated with an actual record class yet.

@kaspth
Copy link
Owner Author

kaspth commented Dec 10, 2024

And we're hitting the same issue with supporting Polymorphic Associated Objects.

@kaspth
Copy link
Owner Author

kaspth commented Dec 13, 2024

Has the same issues as #30 and #29, I think I still want this but not sure how to resolve it! So we close for now.

@kaspth kaspth closed this Dec 13, 2024
@kaspth kaspth deleted the facilitate-application_record-associated_object branch December 13, 2024 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant