@@ -1587,9 +1587,9 @@ defmodule Ecto.Schema do
1587
1587
## Options
1588
1588
1589
1589
* `:primary_key` - The `:primary_key` option can be used with the same arguments
1590
- as `@primary_key` (see the [Schema attributes](https://hexdocs.pm/ecto/Ecto.Schema.html #module-schema-attributes)
1590
+ as `@primary_key` (see the [Schema attributes](#module-schema-attributes)
1591
1591
section for more info). Primary keys are automatically set up for embedded schemas as well,
1592
- defaulting to `{:id, :binary_id, autogenerate: true}`.
1592
+ defaulting to `{:id, :binary_id, autogenerate: true}`.
1593
1593
1594
1594
* `:on_replace` - The action taken on associations when the embed is
1595
1595
replaced when casting or manipulating parent changeset. May be
@@ -2000,12 +2000,13 @@ defmodule Ecto.Schema do
2000
2000
writable = opts [ :writable ] || :always
2001
2001
put_struct_field ( mod , name , Keyword . get ( opts , :default ) )
2002
2002
2003
- redact_field? = Keyword . get_lazy ( opts , :redact , fn ->
2004
- case Module . get_attribute ( mod , :schema_redact , false ) do
2005
- :all_except_primary_keys -> not pk?
2006
- false -> false
2007
- end
2008
- end )
2003
+ redact_field? =
2004
+ Keyword . get_lazy ( opts , :redact , fn ->
2005
+ case Module . get_attribute ( mod , :schema_redact , false ) do
2006
+ :all_except_primary_keys -> not pk?
2007
+ false -> false
2008
+ end
2009
+ end )
2009
2010
2010
2011
if redact_field? do
2011
2012
Module . put_attribute ( mod , :ecto_redact_fields , name )
0 commit comments