Class: Blog::ApplicationController

Inherits:
ApplicationController
  • Object
show all
Includes:
BlogsHelper
Defined in:
app/controllers/blog/application_controller.rb

Overview

inherit from the mounting application’s application_controller

Instance Method Summary collapse

Methods included from BlogsHelper

#allowable_html, #construct_blog_path, #posted_by_on

Instance Method Details

#can_manage_blogsObject



10
11
12
# File 'app/controllers/blog/application_controller.rb', line 10

def can_manage_blogs
  redirect_to main_app.root_url, :notice => 'You do not have permissions to view that page.' unless blog_user_can?(:manage, Blog)
end

#can_manage_contextsObject



14
15
16
# File 'app/controllers/blog/application_controller.rb', line 14

def can_manage_contexts
  redirect_to main_app.root_url, :notice => 'You do not have permissions to view that page.' unless blog_user_can?(:manage, Context)
end