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
-
#check_access_to_section ⇒ Object
Before filter that determines if the current user can access a specific section.
- #determine_page_layout ⇒ Object
-
#page_title=(title) ⇒ Object
Allows a Controller method to set a page title for an action.
Instance Method Details
#check_access_to_section ⇒ Object
Before filter that determines if the current user can access a specific section.
50 51 52 53 54 55 56 57 |
# File 'lib/cms/acts/content_page.rb', line 50 def check_access_to_section user = current_user logger.warn "Checking that current_user '#{user.login}' 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 |
#determine_page_layout ⇒ Object
59 60 61 |
# File 'lib/cms/acts/content_page.rb', line 59 def determine_page_layout @page.layout end |
#page_title=(title) ⇒ Object
Allows a Controller method to set a page title for an action.
45 46 47 |
# File 'lib/cms/acts/content_page.rb', line 45 def page_title=(title) @page_title = title end |