From 2de7cacc563b1c162d11b53ac0f8dbb35cd981de Mon Sep 17 00:00:00 2001 From: c4710n Date: Fri, 4 Oct 2024 13:21:35 +0800 Subject: [PATCH 1/2] docs: rename :user_update to :user_updated --- .../introduction/Tracking columns and using labels.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/guides/introduction/Tracking columns and using labels.md b/guides/introduction/Tracking columns and using labels.md index a4b632c..37607c4 100644 --- a/guides/introduction/Tracking columns and using labels.md +++ b/guides/introduction/Tracking columns and using labels.md @@ -36,18 +36,18 @@ You can also use labels in general without tracking specific columns: pub_sub: MyApp.PubSub, watchers: [ # ... - {User, :updated, label: :user_update}, + {User, :updated, label: :user_updated}, # ... ]} # subscribing - EctoWatch.subscribe(:user_update) + EctoWatch.subscribe(:user_updated) # or... - EctoWatch.subscribe(:user_update, package.id) + EctoWatch.subscribe(:user_updated, package.id) # or... - EctoWatch.subscribe(:user_update, {:role_id, role_id}) + EctoWatch.subscribe(:user_updated, {:role_id, role_id}) # handling messages - def handle_info({:user_update, %{id: id}}, socket) do + def handle_info({:user_updated, %{id: id}}, socket) do ``` From ceea458842f944861b368fd0ee6a09415daafb9f Mon Sep 17 00:00:00 2001 From: c4710n Date: Sat, 5 Oct 2024 20:08:22 +0800 Subject: [PATCH 2/2] fix: fix warning of unused module attribute --- lib/ecto_watch.ex | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ecto_watch.ex b/lib/ecto_watch.ex index 59f86dc..53fd688 100644 --- a/lib/ecto_watch.ex +++ b/lib/ecto_watch.ex @@ -41,7 +41,6 @@ defmodule EctoWatch do Supervisor.init(children, strategy: :rest_for_one) end - @since "0.8.0" @deprecated "subscribe/3 was removed in version 0.8.0. See the updated documentation" def subscribe(schema_mod_or_label, update_type, id) when is_atom(schema_mod_or_label) do if Helpers.ecto_schema_mod?(schema_mod_or_label) do