Skip to content

Conversation

@ballauriena
Copy link

Added this to Interport this past week to add some functionality to delegate_scope so I wanted to add it here as well. Not sure if I should be doing anything with the gem version...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do something like

relation = joins(association.name).merge(association.klass.send(source, *args))
relation = relation.group(grouping) if grouping
relation

to reduce the bit of duplication

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried it and it broke things...i can dive in a little more next FF...and add specs :)

@artfuldodger
Copy link
Member

👍

@jakesutton
Copy link

I like Jon's thing and of course somebody has to suggest you add a spec... 👍

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.

4 participants