Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
82e96eb2
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
82e96eb2
编写于
6月 03, 2008
作者:
D
David Heinemeier Hansson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dependencies move to ActiveSupport::Dependencies missed a few spots
上级
88545353
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
9 deletion
+9
-9
railties/lib/initializer.rb
railties/lib/initializer.rb
+7
-7
railties/lib/rails/plugin/loader.rb
railties/lib/rails/plugin/loader.rb
+2
-2
未找到文件。
railties/lib/initializer.rb
浏览文件 @
82e96eb2
...
...
@@ -204,10 +204,10 @@ def set_load_path
# Set the paths from which Rails will automatically load source files, and
# the load_once paths.
def
set_autoload_paths
Dependencies
.
load_paths
=
configuration
.
load_paths
.
uniq
Dependencies
.
load_once_paths
=
configuration
.
load_once_paths
.
uniq
ActiveSupport
::
Dependencies
.
load_paths
=
configuration
.
load_paths
.
uniq
ActiveSupport
::
Dependencies
.
load_once_paths
=
configuration
.
load_once_paths
.
uniq
extra
=
Dependencies
.
load_once_paths
-
Dependencies
.
load_paths
extra
=
ActiveSupport
::
Dependencies
.
load_once_paths
-
ActiveSupport
::
Dependencies
.
load_paths
unless
extra
.
empty?
abort
<<-
end_error
load_once_paths must be a subset of the load_paths.
...
...
@@ -234,7 +234,7 @@ def add_support_load_paths
end
# Adds all load paths from plugins to the global set of load paths, so that
# code from plugins can be required (explicitly or automatically via Dependencies).
# code from plugins can be required (explicitly or automatically via
ActiveSupport::
Dependencies).
def
add_plugin_load_paths
plugin_loader
.
add_plugin_load_paths
end
...
...
@@ -416,7 +416,7 @@ def initialize_routing
# Sets the dependency loading mechanism based on the value of
# Configuration#cache_classes.
def
initialize_dependency_mechanism
Dependencies
.
mechanism
=
configuration
.
cache_classes
?
:require
:
:load
ActiveSupport
::
Dependencies
.
mechanism
=
configuration
.
cache_classes
?
:require
:
:load
end
# Loads support for "whiny nil" (noisy warnings when methods are invoked
...
...
@@ -602,12 +602,12 @@ def plugins=(plugins)
# If <tt>reload_plugins?</tt> is false, add this to your plugin's <tt>init.rb</tt>
# to make it reloadable:
#
# Dependencies.load_once_paths.delete lib_path
#
ActiveSupport::
Dependencies.load_once_paths.delete lib_path
#
# If <tt>reload_plugins?</tt> is true, add this to your plugin's <tt>init.rb</tt>
# to only load it once:
#
# Dependencies.load_once_paths << lib_path
#
ActiveSupport::
Dependencies.load_once_paths << lib_path
#
attr_accessor
:reload_plugins
...
...
railties/lib/rails/plugin/loader.rb
浏览文件 @
82e96eb2
...
...
@@ -45,9 +45,9 @@ def add_plugin_load_paths
plugins
.
each
do
|
plugin
|
plugin
.
load_paths
.
each
do
|
path
|
$LOAD_PATH
.
insert
(
application_lib_index
+
1
,
path
)
Dependencies
.
load_paths
<<
path
ActiveSupport
::
Dependencies
.
load_paths
<<
path
unless
Rails
.
configuration
.
reload_plugins?
Dependencies
.
load_once_paths
<<
path
ActiveSupport
::
Dependencies
.
load_once_paths
<<
path
end
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录