aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/refinery
diff options
context:
space:
mode:
authorJamie Winsor <jamie@enmasse.com>2011-09-19 18:48:29 -0700
committerJamie Winsor <jamie@enmasse.com>2011-09-19 18:48:29 -0700
commitbe7d341532c0e5fc92d2822eea924956ab704d54 (patch)
treee613ab144b4295073aef9f1a78d45a16119feae4 /app/controllers/refinery
parentde4cc6b9efdba3e1eeb398f01a46331b80895314 (diff)
downloadrefinerycms-blog-be7d341532c0e5fc92d2822eea924956ab704d54.tar.gz
refinerycms-blog-be7d341532c0e5fc92d2822eea924956ab704d54.tar.bz2
refinerycms-blog-be7d341532c0e5fc92d2822eea924956ab704d54.zip
Namespace BlogController into Blog::BaseController
Diffstat (limited to 'app/controllers/refinery')
-rw-r--r--app/controllers/refinery/blog/base_controller.rb17
-rw-r--r--app/controllers/refinery/blog/categories_controller.rb2
-rw-r--r--app/controllers/refinery/blog/posts_controller.rb2
-rw-r--r--app/controllers/refinery/blog_controller.rb15
4 files changed, 19 insertions, 17 deletions
diff --git a/app/controllers/refinery/blog/base_controller.rb b/app/controllers/refinery/blog/base_controller.rb
new file mode 100644
index 0000000..7010283
--- /dev/null
+++ b/app/controllers/refinery/blog/base_controller.rb
@@ -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
diff --git a/app/controllers/refinery/blog/categories_controller.rb b/app/controllers/refinery/blog/categories_controller.rb
index 57196c3..80e54d9 100644
--- a/app/controllers/refinery/blog/categories_controller.rb
+++ b/app/controllers/refinery/blog/categories_controller.rb
@@ -1,6 +1,6 @@
module Refinery
module Blog
- class CategoriesController < BlogController
+ class CategoriesController < BaseController
def show
@category = Refinery::BlogCategory.find(params[:id])
diff --git a/app/controllers/refinery/blog/posts_controller.rb b/app/controllers/refinery/blog/posts_controller.rb
index ad576a5..7b09329 100644
--- a/app/controllers/refinery/blog/posts_controller.rb
+++ b/app/controllers/refinery/blog/posts_controller.rb
@@ -1,6 +1,6 @@
module Refinery
module Blog
- class PostsController < BlogController
+ class PostsController < BaseController
caches_page :index
diff --git a/app/controllers/refinery/blog_controller.rb b/app/controllers/refinery/blog_controller.rb
deleted file mode 100644
index 314c919..0000000
--- a/app/controllers/refinery/blog_controller.rb
+++ /dev/null
@@ -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