mirror of
https://github.com/neocities/neocities.git
synced 2025-07-22 02:26:07 +02:00
optimize performance for site profile render
This commit is contained in:
parent
13988ad74a
commit
e1eb377a92
8 changed files with 38 additions and 171 deletions
|
@ -5,7 +5,7 @@ class Comment < Sequel::Model
|
|||
one_to_many :comment_likes
|
||||
|
||||
def liking_site_names
|
||||
comment_likes.collect {|comment_like| comment_like.actioning_site.username }
|
||||
comment_likes_dataset.select(:id, :actioning_site_id).all.collect {|comment_like| comment_like.actioning_site_dataset.select(:username).first.username }
|
||||
end
|
||||
|
||||
def site_likes?(site)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue