-
Notifications
You must be signed in to change notification settings - Fork 96
Description
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?