Skip to content

Instantly share code, notes, and snippets.

@pikender
Created April 12, 2016 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pikender/bf89a77d2ed7c684dd0258d88e777cc0 to your computer and use it in GitHub Desktop.
Save pikender/bf89a77d2ed7c684dd0258d88e777cc0 to your computer and use it in GitHub Desktop.
Check Model Extension to have same behaviour while refactoring (creating model extension)
nectarcommerce ~/elixir$ iex -S mix
## File Compilation Removed
iex(4)> a = Nectar.Product.changeset(%Nectar.Product{}, %{}); a.model.special;
nil
iex(5)> b = Ecto.Changeset.put_change(a, :special, true); b.changes.special;
true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment