Skip to content

Commit de0d9eb

Browse files
Merge pull request #32 from plastic-forks/zd/improve-doc
Improve docs and fix a warning
2 parents 921f171 + ceea458 commit de0d9eb

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

guides/introduction/Tracking columns and using labels.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ You can also use labels in general without tracking specific columns:
3636
pub_sub: MyApp.PubSub,
3737
watchers: [
3838
# ...
39-
{User, :updated, label: :user_update},
39+
{User, :updated, label: :user_updated},
4040
# ...
4141
]}
4242

4343
# subscribing
44-
EctoWatch.subscribe(:user_update)
44+
EctoWatch.subscribe(:user_updated)
4545
# or...
46-
EctoWatch.subscribe(:user_update, package.id)
46+
EctoWatch.subscribe(:user_updated, package.id)
4747
# or...
48-
EctoWatch.subscribe(:user_update, {:role_id, role_id})
48+
EctoWatch.subscribe(:user_updated, {:role_id, role_id})
4949

5050
# handling messages
51-
def handle_info({:user_update, %{id: id}}, socket) do
51+
def handle_info({:user_updated, %{id: id}}, socket) do
5252
```
5353

lib/ecto_watch.ex

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ defmodule EctoWatch do
4141
Supervisor.init(children, strategy: :rest_for_one)
4242
end
4343

44-
@since "0.8.0"
4544
@deprecated "subscribe/3 was removed in version 0.8.0. See the updated documentation"
4645
def subscribe(schema_mod_or_label, update_type, id) when is_atom(schema_mod_or_label) do
4746
if Helpers.ecto_schema_mod?(schema_mod_or_label) do

0 commit comments

Comments
 (0)