app/models/user.rb
def notebook_recommendations(allow_run=true)
    # Compute on the fly in case the cron hasn't run for a new user
    compute_recommendations if allow_run && newish_user && suggested_notebooks.count.zero?

    # Return recommendations filtered for readability
    Notebook.readable_megajoin(self).order('score DESC').having('reasons IS NOT NULL')
  end
# Recommended notebooks filtered by readability and deduped.
# Not to be confused with #suggested_notebooks, which is a
# direct join to the suggestion table without filter/dedupe.
Recommended notebooks filtered by readability and deduped.
Not to be confused with #suggested_notebooks, which is a
direct join to the suggestion table without filter/dedupe.
Recommended notebooks filtered by readability and deduped . Not to be confused with #suggested_notebooks which is a direct join to the suggestion table without filter / dedupe .
def notebook_recommendations(allow_run=true)
    compute_recommendations if allow_run && newish_user && suggested_notebooks.count.zero?
    Notebook.readable_megajoin(self).order('score DESC').having('reasons IS NOT NULL')
  end
def notebook_recommendations ( allow_run = true ) compute_recommendations if allow_run && newish_user && suggested_notebooks . count . zero? Notebook . readable_megajoin ( self ) . order ( 'score DESC' ) . having ( 'reasons IS NOT NULL' ) end
Recommended notebooks filtered by readability and deduped.
Recommended notebooks filtered by readability and deduped .
# Compute on the fly in case the cron hasn't run for a new user # Return recommendations filtered for readability
allow_run