app/models/notebook.rb
def users_also_viewed(user, use_admin=false)
    other = users_also_views
      .includes(:other_notebook)
      .joins('JOIN notebooks ON notebooks.id = users_also_views.other_notebook_id')
    Notebook.readable_join(other, user, use_admin).order(score: :desc)
  end
# Notebooks with high user view overlap, filtered by permissions
Notebooks with high user view overlap, filtered by permissions
Notebooks with high user view overlap filtered by permissions
def users_also_viewed(user, use_admin=false)
    other = users_also_views
      .includes(:other_notebook)
      .joins('JOIN notebooks ON notebooks.id = users_also_views.other_notebook_id')
    Notebook.readable_join(other, user, use_admin).order(score: :desc)
  end
def users_also_viewed ( user , use_admin = false ) other = users_also_views . includes ( :other_notebook ) . joins ( 'JOIN notebooks ON notebooks.id = users_also_views.other_notebook_id' ) Notebook . readable_join ( other , user , use_admin ) . order ( score : :desc ) end
Notebooks with high user view overlap, filtered by permissions
Notebooks with high user view overlap filtered by permissions
user
use_admin