diff options
-rw-r--r-- | actionpack/lib/action_controller/dispatcher.rb | 9 | ||||
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 6 | ||||
-rw-r--r-- | railties/CHANGELOG | 5 | ||||
-rw-r--r-- | railties/Rakefile | 2 | ||||
-rw-r--r-- | railties/doc/guides/source/layouts_and_rendering.txt | 2 | ||||
-rw-r--r-- | railties/helpers/application_controller.rb (renamed from railties/helpers/application.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 3 |
7 files changed, 11 insertions, 16 deletions
diff --git a/actionpack/lib/action_controller/dispatcher.rb b/actionpack/lib/action_controller/dispatcher.rb index 2d5e80f0bb..d93edf067c 100644 --- a/actionpack/lib/action_controller/dispatcher.rb +++ b/actionpack/lib/action_controller/dispatcher.rb @@ -12,14 +12,7 @@ module ActionController after_dispatch :cleanup_application end - # Common callbacks - to_prepare :load_application_controller do - begin - require_dependency 'application' unless defined?(::ApplicationController) - rescue LoadError => error - raise unless error.message =~ /application\.rb/ - end - end + to_prepare(:load_application_controller) { ApplicationController } if defined?(ActiveRecord) after_dispatch :checkin_connections diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index fe568d6127..5dbe466b7b 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -314,11 +314,7 @@ module ActiveSupport #:nodoc: nesting = nesting[1..-1] if nesting && nesting[0] == ?/ next if nesting.blank? - [ - nesting.camelize, - # Special case: application.rb might define ApplicationControlller. - ('ApplicationController' if nesting == 'application') - ] + [ nesting.camelize ] end.flatten.compact.uniq end diff --git a/railties/CHANGELOG b/railties/CHANGELOG index ae20cb50da..e6b90198ab 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,3 +1,8 @@ +*2.3.0/3.0* + +* BACKWARDS INCOMPATIBLE: Renamed application.rb to application_controller.rb and removed all the special casing that was in place to support the former. You must do this rename in your own application when you upgrade to this version [DHH] + + *2.2.1 [RC2] (November 14th, 2008)* * Fixed plugin generator so that generated unit tests would subclass ActiveSupport::TestCase, also introduced a helper script to reduce the needed require statements #1137 [Mathias Meyer] diff --git a/railties/Rakefile b/railties/Rakefile index 1bc59ac0b0..c9541b0292 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -184,7 +184,7 @@ task :copy_html_files do end task :copy_application do - cp "helpers/application.rb", "#{PKG_DESTINATION}/app/controllers/application.rb" + cp "helpers/application_controller.rb", "#{PKG_DESTINATION}/app/controllers/application_controller.rb" cp "helpers/application_helper.rb", "#{PKG_DESTINATION}/app/helpers/application_helper.rb" end diff --git a/railties/doc/guides/source/layouts_and_rendering.txt b/railties/doc/guides/source/layouts_and_rendering.txt index 2cba53b94c..8f1fae5007 100644 --- a/railties/doc/guides/source/layouts_and_rendering.txt +++ b/railties/doc/guides/source/layouts_and_rendering.txt @@ -313,7 +313,7 @@ With those declarations, the +inventory+ layout would be used only for the +inde Layouts are shared downwards in the hierarchy, and more specific layouts always override more general ones. For example: -+application.rb+: ++application_controller.rb+: [source, ruby] ------------------------------------------------------- diff --git a/railties/helpers/application.rb b/railties/helpers/application_controller.rb index 0a3ed822a4..0a3ed822a4 100644 --- a/railties/helpers/application.rb +++ b/railties/helpers/application_controller.rb diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 32c320385d..8c9bc63fc6 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -47,7 +47,8 @@ class AppGenerator < Rails::Generator::Base m.file "README", "README" # Application - m.template "helpers/application.rb", "app/controllers/application.rb", :assigns => { :app_name => @app_name, :app_secret => md5.hexdigest } + m.template "helpers/application_controller.rb", "app/controllers/application_controller.rb", :assigns => { + :app_name => @app_name, :app_secret => md5.hexdigest } m.template "helpers/application_helper.rb", "app/helpers/application_helper.rb" m.template "helpers/test_helper.rb", "test/test_helper.rb" m.template "helpers/performance_test.rb", "test/performance/browsing_test.rb" |