put setup APP var setup into Orbit class
This commit is contained in:
parent
9fa6131ad3
commit
37b8b85554
|
@ -1,4 +1,10 @@
|
||||||
class ObitFrontendComponentController< ApplicationController
|
class ObitFrontendComponentController< ApplicationController
|
||||||
|
before_filter :setup_vars
|
||||||
before_filter {|c| c.front_end_available(@app_title)}
|
before_filter {|c| c.front_end_available(@app_title)}
|
||||||
layout 'production'
|
layout 'production'
|
||||||
|
|
||||||
|
def setup_vars
|
||||||
|
@app_title = request.fullpath.split('/')[2]
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -1,14 +1,6 @@
|
||||||
class Panel::NewBlog::FrontEnd::PostsController < ObitFrontendController
|
class Panel::NewBlog::FrontEnd::PostsController < ObitFrontendController
|
||||||
|
|
||||||
|
|
||||||
def initialize
|
|
||||||
super
|
|
||||||
@app_title = NewBlog::MOUDLEAPP_TITLE
|
|
||||||
end
|
|
||||||
|
|
||||||
# GET /posts
|
# GET /posts
|
||||||
# GET /posts.xml
|
# GET /posts.xml
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@posts = Post.all
|
@posts = Post.all
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
class Panel::NewBlog::Widget::PostsController < ObitWidgetController
|
class Panel::NewBlog::Widget::PostsController < ObitWidgetController
|
||||||
|
|
||||||
layout 'production'
|
|
||||||
|
|
||||||
def initialize
|
|
||||||
super
|
|
||||||
@app_title = NewBlog::MOUDLEAPP_TITLE
|
|
||||||
end
|
|
||||||
|
|
||||||
# GET /posts
|
# GET /posts
|
||||||
# GET /posts.xml
|
# GET /posts.xml
|
||||||
def index
|
def index
|
||||||
|
|
Loading…
Reference in New Issue