community_spotlight.rb 603 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
class Stream::CommunitySpotlight < Stream::Base
  def title
    "Community Spotlight doing cool stuff!"
  end

  def link(opts={})
    Rails.application.routes.url_helpers.spotlight_path(opts)
  end

  def contacts_title
    "This week's community spotlight"
  end

  def contacts_link
    Rails.application.routes.url_helpers.community_spotlight_path
  end

  def contacts_link_title
    I18n.translate('aspects.selected_contacts.view_all_community_spotlight')
  end

  def posts
23
    Post.all_public.where(:author_id => people.map{|x| x.id})
24 25 26 27 28 29
  end

  def people
   Person.community_spotlight
  end
end