Skip to content

Specify Field Name In Scope #114

@jtfairbank

Description

@jtfairbank

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions