app/lib/feed.rb
# Return everything, with all the default options.
#
# Query for different kinds of feed cards, then merge and sort and truncate.
# This means we'll always slightly overquery, since we don't know how many
# different bits of information there are across data sources until
# we query and combine them. Ideally we'd query in parallel but we'd
# need to push this out to the client to do that (and still would have to
# delay rendering until both came back and were merged anyway).
Return everything, with all the default options.
Query for different kinds of feed cards, then merge and sort and truncate.
This means we'll always slightly overquery, since we don't know how many
different bits of information there are across data sources until
we query and combine them. Ideally we'd query in parallel but we'd
need to push this out to the client to do that (and still would have to
delay rendering until both came back and were merged anyway).
Return everything with all the default options . Query for different kinds of feed cards then merge and sort and truncate . This means we ' ll always slightly overquery since we don ' t know how many different bits of information there are across data sources until we query and combine them . Ideally we ' d query in parallel but we ' d need to push this out to the client to do that ( and still would have to delay rendering until both came back and were merged anyway ) .
def all_cards(time_now, limit)
    event_note_cards = self.event_note_cards(time_now, limit)
    birthday_cards = self.birthday_cards(time_now, limit, {
      limit: 3,
      days_back: 3,
      days_ahead: 0
    })
    incident_cards = if PerDistrict.new.include_incident_cards?
      self.incident_cards(time_now, limit)
    else
      []
    end
    self.merge_sort_and_limit_cards([
      event_note_cards,
      birthday_cards,
      incident_cards
    ], limit)
  end
def all_cards ( time_now , limit ) event_note_cards = self . event_note_cards ( time_now , limit ) birthday_cards = self . birthday_cards ( time_now , limit , { limit : 3 , days_back : 3 , days_ahead : 0 } ) incident_cards = if PerDistrict . new . include_incident_cards? self . incident_cards ( time_now , limit ) else [ ] end self . merge_sort_and_limit_cards ( [ event_note_cards , birthday_cards , incident_cards ] , limit ) end
Return everything, with all the default options.
Return everything with all the default options .
time_now
<not_specific>
limit
<not_specific>