ex_machina v1.0.0 Release Notes
Release Date: 2016-06-24 // almost 8 years ago-
⬆️ A lot has changed but we tried to make upgrading as simple as possible.
⬆️ To upgrade: In
mix.exs
change the version to"~> 1.0"
and runmix ⚡️ deps.get
. Once you've updated, runmix test
and ExMachina will raise errors that show you what needs to change to work with 1.0.0.🛠 Fixed
➕ Added
- ➕ Add
Sequence.next/1
for quickly creating sequences. Example:sequence("username")
will generate"username1"
, then"username2"
(#84) - Raise if passing invalid keys to structs (#99)
- Add
params_with_assocs
(#124)
🔄 Changed
- Rename
fields_for
toparams_for
(#98) - If using ExMachina with Ecto, use
insert
,insert_list
andinsert_pair
instead ofcreate_*
- Instead of defining a custom
save_record
, you can now implement anExMachina.Strategy
. See the documentation on hex.pm for more info (#102) - 👀 Define factory as
user_factory
instead offactory(:user)
(#110). See PR and related issue for details on why this was changed. params_for
no longer returns the primary key (#123)
- ➕ Add