Class: Locomotive::Site
- Inherits:
-
Object
- Object
- Locomotive::Site
- Defined in:
- app/models/locomotive/site.rb
Instance Method Summary collapse
- #accounts ⇒ Object
- #admin_memberships ⇒ Object
-
#all_pages_in_once ⇒ Object
methods ##.
- #fetch_page(path, logged_in) ⇒ Object
-
#name ⇒ Object
validations ##.
-
#pages ⇒ Object
associations ##.
Methods included from Extensions::Site::SubdomainDomains
enable_subdomain_n_domains_if_multi_sites
Methods included from Extensions::Site::FirstInstallation
Methods included from Extensions::Site::Locales
#default_locale, #default_locale_was, #locale_fallbacks, #locales=, #localized?, #localized_page_fullpath
Instance Method Details
#accounts ⇒ Object
46 47 48 |
# File 'app/models/locomotive/site.rb', line 46 def accounts Account.criteria.in(:_id => self.memberships.map(&:account_id)) end |
#admin_memberships ⇒ Object
50 51 52 |
# File 'app/models/locomotive/site.rb', line 50 def admin_memberships self.memberships.find_all { |m| m.admin? } end |
#all_pages_in_once ⇒ Object
methods ##
38 39 40 |
# File 'app/models/locomotive/site.rb', line 38 def all_pages_in_once Page.quick_tree(self) end |
#fetch_page(path, logged_in) ⇒ Object
42 43 44 |
# File 'app/models/locomotive/site.rb', line 42 def fetch_page(path, logged_in) Locomotive::Page.fetch_page_from_path self, path, logged_in end |
#name ⇒ Object
validations ##
13 |
# File 'app/models/locomotive/site.rb', line 13 field :name |
#pages ⇒ Object
associations ##
17 |
# File 'app/models/locomotive/site.rb', line 17 references_many :pages, :class_name => 'Locomotive::Page', :validate => false |