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

Specify Field Name In Scope #114

Open
jtfairbank opened this issue Apr 30, 2019 · 0 comments
Open

Specify Field Name In Scope #114

jtfairbank opened this issue Apr 30, 2019 · 0 comments

Comments

@jtfairbank
Copy link

Currently Arc Ecto passes the model into the definition functions as the scope. However if the model has two fields, say an Avatar and a Background, there is no way to distinguish between those photos in the definition functions.

There are a number of work-arounds including having two definition files, creating child models for each image, etc. However those seem overly complex for such a simple use case.

I propose that Arc Ecto passes in a {model, field} tuple for the scope. This could only occur if a specific option is set in the definition file, so that there are no breaking changes to the existing api.

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

No branches or pull requests

1 participant