2011-11-25 14:10:56 +00:00
|
|
|
module Locomotive
|
|
|
|
class SitePresenter < BasePresenter
|
|
|
|
|
2012-01-10 01:24:34 +00:00
|
|
|
delegate :name, :locales, :subdomain, :domains, :robots_txt, :seo_title, :meta_keywords, :meta_description, :domains_without_subdomain, :to => :source
|
2011-11-29 13:58:19 +00:00
|
|
|
|
|
|
|
def domain_name
|
|
|
|
Locomotive.config.domain
|
|
|
|
end
|
|
|
|
|
|
|
|
def memberships
|
|
|
|
self.source.memberships.map { |membership| membership.as_json(self.options) }
|
|
|
|
end
|
2011-11-25 14:10:56 +00:00
|
|
|
|
|
|
|
def included_methods
|
2012-01-10 01:24:34 +00:00
|
|
|
super + %w(name locales domain_name subdomain domains robots_txt seo_title meta_keywords meta_description domains_without_subdomain memberships)
|
2011-11-25 14:10:56 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|