public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Added rake rails:update:application_controller to renamed application.rb to 
application_controller.rb -- included in rake rails:update so upgrading to 2.3 
will automatically trigger it [#1439 state:committed] (kastner)
dhh (author)
Sun Nov 23 04:39:30 -0800 2008
commit  9e08a3bb1d47f79b6953056e72eee58e86d83ead
tree    580239ea9e51653a9305a88a8e395bfed493500f
parent  4d2ccbb364b62275bad142d9a0b66ee7fd0c424a
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *2.3.0 [Edge]*
0
 
0
+* Added rake rails:update:application_controller to renamed application.rb to application_controller.rb -- included in rake rails:update so upgrading to 2.3 will automatically trigger it #1439 [kastner]
0
+
0
 * Added Rails.backtrace_cleaner as an accessor for the Rails::BacktraceCleaner instance used by the framework to cut down on backtrace noise and config/initializers/backtrace_silencers.rb to add your own (or turn them all off) [DHH]
0
 
0
 * Switch from Test::Unit::TestCase to ActiveSupport::TestCase.  [Jeremy Kemper]
...
78
79
80
81
 
82
83
84
...
114
115
116
 
 
 
 
 
 
 
 
 
 
117
118
...
78
79
80
 
81
82
83
84
...
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
0
@@ -78,7 +78,7 @@ namespace :rails do
0
   end
0
 
0
   desc "Update both configs, scripts and public/javascripts from Rails"
0
-  task :update => [ "update:scripts", "update:javascripts", "update:configs" ]
0
+  task :update => [ "update:scripts", "update:javascripts", "update:configs", "update:application_controller" ]
0
 
0
   namespace :update do
0
     desc "Add new scripts to the application script/ directory"
0
@@ -114,5 +114,15 @@ namespace :rails do
0
       require 'railties_path'  
0
       FileUtils.cp(RAILTIES_PATH + '/environments/boot.rb', RAILS_ROOT + '/config/boot.rb')
0
     end
0
+    
0
+    desc "Rename application.rb to application_controller.rb"
0
+    task :application_controller do
0
+      old_style = RAILS_ROOT + '/app/controllers/application.rb'
0
+      new_style = RAILS_ROOT + '/app/controllers/application_controller.rb'
0
+      if File.exists?(old_style) && !File.exists?(new_style)
0
+        FileUtils.mv(old_style, new_style)
0
+        puts "#{old_style} has been renamed to #{new_style}, update your SCM as necessary"
0
+      end
0
+    end
0
   end
0
 end

Comments