Namespace BlogController into Blog::BaseController

This commit is contained in:
Jamie Winsor 2011-09-19 18:48:29 -07:00
parent de4cc6b9ef
commit be7d341532
4 changed files with 19 additions and 17 deletions

View file

@ -0,0 +1,17 @@
module Refinery
module Blog
class BaseController < ::ApplicationController
include ControllerHelper
helper :'refinery/blog_posts'
before_filter :find_page, :find_all_blog_categories
protected
def find_page
@page = Refinery::Page.find_by_link_url("/blog")
end
end
end
end

View file

@ -1,6 +1,6 @@
module Refinery
module Blog
class CategoriesController < BlogController
class CategoriesController < BaseController
def show
@category = Refinery::BlogCategory.find(params[:id])

View file

@ -1,6 +1,6 @@
module Refinery
module Blog
class PostsController < BlogController
class PostsController < BaseController
caches_page :index

View file

@ -1,15 +0,0 @@
module Refinery
class BlogController < ::ApplicationController
include Blog::ControllerHelper
helper :'refinery/blog_posts'
before_filter :find_page, :find_all_blog_categories
protected
def find_page
@page = Refinery::Page.find_by_link_url("/blog")
end
end
end