Module: SitemapsHelper

Defined in:
app/helpers/sitemaps_helper.rb

Instance Method Summary collapse

Instance Method Details

#urlsObject


2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'app/helpers/sitemaps_helper.rb', line 2

def urls
  subdomain = Whitelabel[:label_id]

  topics    = Topic.ordered
  people    = User.peers
  events    = Event.ordered
  locations = Location.all

  urls = (topics + people + events + locations).map do |model|
    send :"#{model.class.to_s.downcase}_url", model, subdomain: subdomain
  end
  (urls + [root_url(subdomain: subdomain)]).flatten
end