Skip to content

Commit

Permalink
Add anchors in documentation (#4428)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrevits committed Jun 5, 2024
1 parent 53be7ef commit f8b3d12
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion lib/ecto/changeset.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,8 @@ defmodule Ecto.Changeset do
* If there is an associated child with an ID and its ID is not given
as parameter, the `:on_replace` callback for that association will
be invoked (see the "On replace" section on the module documentation)
be invoked (see the ["On replace" section](#module-the-on_replace-option)
on the module documentation)
If two or more addresses have the same IDs, Ecto will consider that an
error and add an error to the changeset saying that there are duplicate
Expand Down
9 changes: 6 additions & 3 deletions lib/ecto/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,8 @@ defmodule Ecto.Query do
)
If you need to refer to a parent binding which is not known when writing the subquery,
you can use `parent_as` as shown in the examples under "Named bindings" in this module doc.
you can use `parent_as` as shown in the examples under ["Named bindings"](#module-named-bindings)
in this module doc.
You can also use subquery directly in `select` and `select_merge`:
Expand Down Expand Up @@ -2885,7 +2886,8 @@ defmodule Ecto.Query do
@doc """
Returns `true` if the query has a binding with the given name, otherwise `false`.
For more information on named bindings see "Named bindings" in this module doc.
For more information on named bindings see ["Named bindings"](#module-named-bindings)
in this module doc.
"""
def has_named_binding?(%Ecto.Query{aliases: aliases}, key) do
Map.has_key?(aliases, key)
Expand Down Expand Up @@ -2923,7 +2925,8 @@ defmodule Ecto.Query do
join(query, :left, [p], a in assoc(p, ^binding), as: ^binding)
end)
For more information on named bindings see "Named bindings" in this module doc or `has_named_binding?/2`.
For more information on named bindings see ["Named bindings"](#module-named-bindings)
in this module doc or `has_named_binding?/2`.
"""
def with_named_binding(%Ecto.Query{} = query, key, fun) do
if has_named_binding?(query, key) do
Expand Down
3 changes: 2 additions & 1 deletion lib/ecto/schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,8 @@ defmodule Ecto.Schema do
association, defaults to the primary key on the schema
* `:through` - Allow this association to be defined in terms of existing
associations. Read the section on `:through` associations for more info
associations. Read the [section on `:through` associations](#has_many/3-has_many-has_one-through)
for more info
* `:on_delete` - The action taken on associations when parent record
is deleted. May be `:nothing` (default), `:nilify_all` and `:delete_all`.
Expand Down

0 comments on commit f8b3d12

Please sign in to comment.