more migration of fa user favs to own table

This commit is contained in:
Dylan Knutson
2025-08-20 04:58:06 +00:00
parent 7bca1452e4
commit a76b10634e
7 changed files with 120 additions and 47 deletions

View File

@@ -21,6 +21,14 @@ class Domain::UserPostFav::FaUserPostFav < Domain::UserPostFav
validates :fa_fav_id, uniqueness: true, if: :fa_fav_id?
before_save :set_inferred_time
sig { void }
def set_inferred_time
if (e = explicit_time)
self.inferred_time = e
end
end
sig(:final) { override.returns(T.nilable(FavedAt)) }
def faved_at
if (e = explicit_time)

View File

@@ -1,5 +1,5 @@
<h1 class="text-2xl">
<%= link_to user.name_for_view, domain_user_path(user), class: "text-blue-600 hover:text-blue-800" %>'s posts
<%= page_str(params) %>
(<%= posts.total_count %> total)
(<%= relation.total_count %> total)
</h1>