 
     case Repo.update(changeset) do
       {:ok, class} ->
+        ClassHelper.notify_class_students(class, :class_updated)
         conn
         |> put_flash(:info, "Class updated successfully.")
         |> redirect(to: class_path(conn, :show, class))


  def delete(conn, %{"id" => id}) do
    case ClassHelper.delete(id) do
      {:ok, _class} ->
        conn
        |> put_flash(:info, "Class deleted successfully.")
        |> redirect(to: class_path(conn, :index))


    case Repo.insert(changeset) do
      {:ok, class} ->
        ClassHelper.notify_class_students(class, :class_subscribed)
        conn
        |> put_flash(:info, "Class created successfully.")
        |> redirect(to: class_path(conn, :index))
