fix calendar broken

This commit is contained in:
Fu Matthew committed 2013-01-03 10:58:52 +08:00
1 parent 10473af154
commit 5d6279a9ea
6 files changed
+48 -1

No files matched your search

+2 -1
View File
@@ -2,8 +2,9 @@ class ApplicationController < ActionController::Base
protect_from_forgery
include ParserFrontEnd, ParserBackEnd, ApplicationHelper
include OrbitApp::ErrorHandlers::ObjectAuthErrorHandler
include OrbitApp::ErrorHandlers
rescue_from ObjectAuthError, :with => :render_object_auth_error
rescue_from ModuleAppError, :with => :render_module_app_error
layout :layout_by_resource
@@ -13,6 +13,7 @@ class OrbitBackendController < ApplicationController
def setup_vars
@app_title ||= controller_path.split('/')[1].singularize
@module_app ||= ModuleApp.first(conditions: {:key => @app_title} )
raise ModuleAppError, 'Can not find ModuleApp' if @module_app.nil?
end
private
+3
View File
@@ -0,0 +1,3 @@
class ModuleAppError < StandardError
end