diaspora/lib/stream/community_spotlight.rb
2011-10-20 11:50:58 -07:00

29 lines
633 B
Ruby

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
Post.all_public.where(:author_id => people.map{|x| x.id}).for_a_stream(max_time, order)
end
def people
Person.community_spotlight
end
end