fix for listing object error

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-09-19 10:45:03 +08:00
1 parent 1240064e23
commit 959b6aee12
2 files changed
+10 -5

No files matched your search

@@ -74,10 +74,15 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
end
def setup_vars
@app_title = request.env['HTTP_REFERER'].split('/')[4]
#@app_title = request.fullpath.split('/')[1] if(@app_title == "back_end")
@app_title.gsub!(/[?].*/,'')
@module_app = ModuleApp.first(conditions: {:key => @app_title} )
if request.env['HTTP_REFERER'].split('/')[4] == "object_auths"
@app_key = params[:app_key]
else
@app_key = request.env['HTTP_REFERER'].split('/')[4]
end
#@app_key = request.fullpath.split('/')[1] if(@app_key == "back_end")
@app_key.gsub!(/[?].*/,'')
@module_app = ModuleApp.first(conditions: {:key => @app_key} )
end
end