Skip to content

Instantly share code, notes, and snippets.

@sorentwo
Created March 9, 2016 17:46
Show Gist options
  • Save sorentwo/9b351ead9fbc2c7da500 to your computer and use it in GitHub Desktop.
Save sorentwo/9b351ead9fbc2c7da500 to your computer and use it in GitHub Desktop.
git diff v1.1.3..master -- lib/ecto/changeset.ex
* `valid?` - Stores if the changeset is valid
- * `model` - The changeset root model
+ * `data` - The changeset source data, for example, a struct
* `params` - The parameters as given on changeset creation
* `changes` - The `changes` from parameters that were approved in casting
* `errors` - All errors from validations
* `validations` - All validations performed in the changeset
* `constraints` - All constraints defined in the changeset
* `required` - All required fields as a list of atoms
- * `optional` - All optional fields as a list of atoms
* `filters` - Filters (as a map `%{field => value}`) to narrow the scope of update/delete queries
* `action` - The action to be performed with the changeset
- * `types` - Cache of the model's field types
+ * `types` - Cache of the data's field types
* `repo` - The repository applying the changeset (only set after a Repo function is called)
* `opts` - The options given to the repository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment