Module: Cms::Acts::ContentPage

Included in:
Tests::PretendController
Defined in:
lib/cms/acts/content_page.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#check_access_to_sectionObject

Before filter that determines if the current user can access a specific section.



53
54
55
56
57
58
59
60
# File 'lib/cms/acts/content_page.rb', line 53

def check_access_to_section
  user = current_user
  logger.warn "Checking that current_user '#{user.}' has access to view section with path '#{self.class.in_section}'."
  unless user.able_to_view?(self.class.in_section)
    store_location
    raise Cms::Errors::AccessDenied
  end
end

#page_title=(title) ⇒ Object

Allows a Controller method to set a page title for an action.



48
49
50
# File 'lib/cms/acts/content_page.rb', line 48

def page_title=(title)
  @page_title = title
end