Skip to content

Ecto changesets #26

@trestrantham

Description

@trestrantham

In an effort to further look into both parameter sanitization at the controller level and validations at the model level, I had some discussions with José about changesets and they seem to be the way forward. His original proposal is outlined here and it has since been implemented into ecto (master). This is coupled with phoenix master as well which will be released as 0.10 this weekend (per chrismccord).

My proposal is to created Addict.User that is useed in a developer-specified user model that adds the various changeset functions (see José's proposal) we need to validate parameters in AddictController. These changeset functions will also provide direct tie in with validations for both predefined and custom validations as well. Two birds; one stone. 😄

Documentation for ecto changesets can be found here.

Any thoughts on this approach?

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