Module: ExceptionNotification::PageExtensions::ClassMethods

Defined in:
lib/exception_notification/page_extensions.rb

Instance Method Summary collapse

Instance Method Details

#find_error_page(type) ⇒ Object

Raises:

  • (Page::MissingRootPageError)


23
24
25
26
27
28
29
30
# File 'lib/exception_notification/page_extensions.rb', line 23

def find_error_page(type)
  root = find_by_parent_id(nil)
  if respond_to?(:current_site) && current_site
    root = current_site.homepage
  end
  raise Page::MissingRootPageError unless root
  root.find_error_page(type)
end