mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Move Controllers wrapper module away from environment.rb and into dependencies.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -85,4 +85,6 @@ module ActionController #:nodoc:
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Controllers = Dependencies::LoadingModule.new(File.expand_path(File.join(RAILS_ROOT, 'app', 'controllers'))) if defined?(RAILS_ROOT)
|
||||
29
activesupport/lib/active_support.rb
Normal file
29
activesupport/lib/active_support.rb
Normal file
@@ -0,0 +1,29 @@
|
||||
#--
|
||||
# Copyright (c) 2005 David Heinemeier Hansson
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#++
|
||||
|
||||
$:.unshift(File.dirname(__FILE__))
|
||||
|
||||
require 'active_support/core_ext'
|
||||
require 'active_support/clean_logger'
|
||||
require 'active_support/misc'
|
||||
require 'active_support/dependencies'
|
||||
@@ -41,8 +41,6 @@ require_dependency "environments/#{RAILS_ENV}"
|
||||
ActiveRecord::Base.configurations = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml"))
|
||||
ActiveRecord::Base.establish_connection
|
||||
|
||||
Controllers = Dependencies::LoadingModule.new(File.expand_path(File.join(RAILS_ROOT, 'app', 'controllers')))
|
||||
|
||||
|
||||
# Configure defaults if the included environment did not.
|
||||
begin
|
||||
|
||||
@@ -37,8 +37,6 @@ require_dependency "environments/#{RAILS_ENV}"
|
||||
ActiveRecord::Base.configurations = YAML::load(File.open("#{RAILS_ROOT}/config/database.yml"))
|
||||
ActiveRecord::Base.establish_connection
|
||||
|
||||
Controllers = Dependencies::LoadingModule.new(File.expand_path(File.join(RAILS_ROOT, 'app', 'controllers')))
|
||||
|
||||
|
||||
# Configure defaults if the included environment did not.
|
||||
begin
|
||||
|
||||
@@ -23,7 +23,12 @@
|
||||
|
||||
$:.unshift(File.dirname(__FILE__))
|
||||
|
||||
require 'active_support'
|
||||
begin
|
||||
require 'active_support'
|
||||
rescue LoadError
|
||||
require 'rubygems'
|
||||
require_gem 'activesupport'
|
||||
end
|
||||
|
||||
require 'rails_generator/base'
|
||||
require 'rails_generator/lookup'
|
||||
|
||||
Reference in New Issue
Block a user