-
Notifications
You must be signed in to change notification settings - Fork 687
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
Allow multiple associated audits #406
base: main
Are you sure you want to change the base?
Conversation
ccccca8
to
bcb73c3
Compare
Hey @fatkodima I just started using this gem and decided to use your PR as a starting point. Generally things are working! I noticed that if I ask for associates, I get the full list of associated models, even those that didn't change with that audit. For instance, I have a Reservation that I've changed the house_id of from one house to another. The associates field returns the reservation's associated guest record even though it didn't change in addition to the new house record. I also noticed the associated_audits method stayed the same...should that be like, associates_audits now? |
Hey, I've been rolling with this PR for a month or two and will get it into production soon. Could we possibly merge it into master? |
Hi there. Also interested in seeing this merged, aside from the conflicts is it just waiting for 5.0 to be ready? |
Hi, I am having an issue while setting up this gem with above branch. Application stack:
I am getting following error while performing
I am trying to implement this gem but without this branch, it's no use for me. So, I like to ask in which branch this pull request will be merged and when are you guys planning to release a version including these changes. Thank you |
I'd be willing to bet that in the vast majority of cases where there's a need for more than one associated, the need is specifically for 2 (supporting HABTM). If so, would it be better just to add 2 more fields to the |
any progress on this? |
I am here. This was created quite a while ago 😅 If people will accept the PR, I will update it. |
+1 for getting some motion on this since I could really use it. I'm getting ready to start testing this solution. It's not exactly like what is being suggested here but could work for a through model having two However I believe @fatkodima that the conflicts need to be resolved first before it can be merged. |
+1 this PR would be incredibly useful if accepted @silent-e curious how you were able to adapt the HABTM solution for the simpler use case here? |
This PR adds the ability to associate a model with multiple parent models. Something like the following:
This introduces a bit of backwards incompatibility (like renaming
associated
toassociates
, for example) so I'm wondering how we should handle this: a) extensively deprecating (how?
- also remains as a question then) or b) do not worry too much and release in next major version or c) other variant?Related #337.
Related #209.
Related PR #342 - discussion on why this should be better to implement using separate table.