app/models/overview.rb
# most recent upload to default stream by any provider organization
most recent upload to default stream by any provider organization
most recent upload to default stream by any provider organization
def last_upload
    @last_upload ||=
      Upload.includes(:organization, :stream)
            .where(organization: { provider: true, public: true })
            .where(stream: { default: true })
            .order(created_at: :desc)
            .first
  end
def last_upload @last_upload ||= Upload . includes ( :organization , :stream ) . where ( organization : { provider : true , public : true } ) . where ( stream : { default : true } ) . order ( created_at : :desc ) . first end
most recent upload to default stream by any provider organization
most recent upload to default stream by any provider organization