2011-11-25 14:10:56 +00:00
|
|
|
module Locomotive
|
|
|
|
class SitePresenter < BasePresenter
|
|
|
|
|
2011-11-29 13:58:19 +00:00
|
|
|
delegate :name, :subdomain, :domains, :robots_txt, :seo_title, :meta_keywords, :meta_description, :domains_without_subdomain, :to => :source
|
|
|
|
|
|
|
|
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
|
2011-11-29 13:58:19 +00:00
|
|
|
super + %w(name 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
|