Sha256: 5887132a14ccc709bb7681e1d726336813169637822118239a242125942c0f44
Contents?: true
Size: 647 Bytes
Versions: 14
Compression:
Stored size: 647 Bytes
Contents
#coding: utf-8 #导入项目中使用的CodeHashes GlobalConst.load_app_code_hashes! #对rails应用的扩展 if defined?(Rails) #TODO 为什么不能像ActiveRecord::Base一样include,到底什么道理呢??? #预加载,否则此处定义后为什么不去加载项目中的定义文件呢??? #这样做的缺点,改变了加载顺序,需调查有依赖时是否影响较大??? require 'application_controller' class ApplicationController # < ActionController::Base include ApplicationControllerModule end if defined?(ActiveRecord::Base) ActiveRecord::Base.send(:include, FieldMapping) end end
Version data entries
14 entries across 14 versions & 1 rubygems