diff --git a/app/controllers/obit_frontend_component_controller.rb b/app/controllers/obit_frontend_component_controller.rb index d5bfaac6..06bb06a5 100644 --- a/app/controllers/obit_frontend_component_controller.rb +++ b/app/controllers/obit_frontend_component_controller.rb @@ -1,4 +1,10 @@ class ObitFrontendComponentController< ApplicationController + before_filter :setup_vars before_filter {|c| c.front_end_available(@app_title)} layout 'production' + + def setup_vars + @app_title = request.fullpath.split('/')[2] + end + end \ No newline at end of file diff --git a/vendor/built_in_modules/new_blog/app/controllers/panel/new_blog/front_end/posts_controller.rb b/vendor/built_in_modules/new_blog/app/controllers/panel/new_blog/front_end/posts_controller.rb index 2471e5fd..1aeb34b2 100644 --- a/vendor/built_in_modules/new_blog/app/controllers/panel/new_blog/front_end/posts_controller.rb +++ b/vendor/built_in_modules/new_blog/app/controllers/panel/new_blog/front_end/posts_controller.rb @@ -1,14 +1,6 @@ class Panel::NewBlog::FrontEnd::PostsController < ObitFrontendController - - - def initialize - super - @app_title = NewBlog::MOUDLEAPP_TITLE - end - # GET /posts # GET /posts.xml - def index @posts = Post.all end diff --git a/vendor/built_in_modules/new_blog/app/controllers/panel/new_blog/widget/posts_controller.rb b/vendor/built_in_modules/new_blog/app/controllers/panel/new_blog/widget/posts_controller.rb index 796155bc..dab532ee 100644 --- a/vendor/built_in_modules/new_blog/app/controllers/panel/new_blog/widget/posts_controller.rb +++ b/vendor/built_in_modules/new_blog/app/controllers/panel/new_blog/widget/posts_controller.rb @@ -1,12 +1,4 @@ class Panel::NewBlog::Widget::PostsController < ObitWidgetController - - layout 'production' - - def initialize - super - @app_title = NewBlog::MOUDLEAPP_TITLE - end - # GET /posts # GET /posts.xml def index