Sha256: be7f329e0b946738a900394209b6bb2cd8629ab3df11eea865ed99b874c85e23
Contents?: true
Size: 670 Bytes
Versions: 146
Compression:
Stored size: 670 Bytes
Contents
module MultiSite::ApplicationControllerExtensions def current_site Page.current_site end def current_site=(site=nil) Page.current_site = site end # this is overridden in Admin::ResourceController to respond correctly def sited_model? false end def set_site true if self.current_site = discover_current_site end # chains will attach here def discover_current_site site_from_host end # and add more ways to determine the current site def site_from_host Site.find_for_host(request.host) end def self.included(base) base.class_eval { helper_method :current_site, :current_site= } end end
Version data entries
146 entries across 146 versions & 2 rubygems