Fix for ad_image

This commit is contained in:
chris 2012-11-20 15:47:07 +08:00
parent 7416020161
commit 6273300c28
2 changed files with 10 additions and 5 deletions

View File

@ -1,8 +1,13 @@
class Admin::AdImagesController < OrbitBackendController
class Admin::AdImagesController < Admin::AdBannersController
before_filter :force_order_for_user
before_filter :for_app_sub_manager
before_filter :for_app_manager
# before_filter :force_order_for_user
# before_filter :for_app_sub_manager
# before_filter :for_app_manager
def initialize
super
@app_title = "ad_banner"
end
def edit
@ad_banner = AdBanner.find params[:ad_banner_id]

View File

@ -11,7 +11,7 @@ class OrbitBackendController < ApplicationController
layout 'new_admin'
def setup_vars
@app_title = controller_path.split('/')[1].singularize
@app_title ||= controller_path.split('/')[1].singularize
@module_app ||= ModuleApp.first(conditions: {:key => @app_title} )
end