Ticket #10570: application_to_application_controller_forgiving_version.diff
| File application_to_application_controller_forgiving_version.diff, 6.5 kB (added by jaycfields, 6 months ago) |
|---|
-
activesupport/test/dependencies_test.rb
old new 446 446 447 447 def test_application_should_special_case_application_controller 448 448 with_loading 'autoloading_fixtures' do 449 require_dependency 'application '449 require_dependency 'application_controller' 450 450 assert_equal 10, ApplicationController 451 451 assert Dependencies.autoloaded?(:ApplicationController) 452 452 end -
activesupport/test/autoloading_fixtures/application.rb
old new -
activesupport/test/autoloading_fixtures/application_controller.rb
old new -
railties/test/initializer_test.rb
old new 136 136 end 137 137 end 138 138 139 uses_mocha "Checking application.rb tests" do 140 class Initializer_check_application_file_name_Test < Test::Unit::TestCase 141 def test_abort_if_application_file_exists 142 Rails::Initializer.any_instance.expects(:puts) 143 File.expects(:exist?).returns true 144 Rails::Initializer.run(:check_application_file_name) 145 end 146 147 def test_no_abort_if_application_file_does_not_exist 148 Rails::Initializer.any_instance.expects(:puts).never 149 File.expects(:exist?).returns false 150 Rails::Initializer.run(:check_application_file_name) 151 end 152 end 153 end 154 139 155 uses_mocha "Initializer plugin loading tests" do 140 156 require File.dirname(__FILE__) + '/plugin_test_helper' 141 157 -
railties/helpers/application.rb
old new 1 # Filters added to this controller apply to all controllers in the application.2 # Likewise, all the methods added will be available for all controllers.3 4 class ApplicationController < ActionController::Base5 helper :all # include all helpers, all the time6 7 # See ActionController::RequestForgeryProtection for details8 # Uncomment the :secret if you're not using the cookie session store9 protect_from_forgery # :secret => '<%= app_secret %>'10 end -
railties/helpers/application_controller.rb
old new 1 # Filters added to this controller apply to all controllers in the application. 2 # Likewise, all the methods added will be available for all controllers. 3 4 class ApplicationController < ActionController::Base 5 helper :all # include all helpers, all the time 6 7 # See ActionController::RequestForgeryProtection for details 8 # Uncomment the :secret if you're not using the cookie session store 9 protect_from_forgery # :secret => '<%= app_secret %>' 10 end -
railties/lib/rails_generator/generators/applications/app/app_generator.rb
old new 48 48 m.file "README", "README" 49 49 50 50 # Application 51 m.template "helpers/application .rb", "app/controllers/application.rb", :assigns => { :app_name => @app_name, :app_secret => md5.hexdigest }51 m.template "helpers/application_controller.rb", "app/controllers/application_controller.rb", :assigns => { :app_name => @app_name, :app_secret => md5.hexdigest } 52 52 m.template "helpers/application_helper.rb", "app/helpers/application_helper.rb" 53 53 m.template "helpers/test_helper.rb", "test/test_helper.rb" 54 54 -
railties/lib/console_with_helpers.rb
old new 16 16 end 17 17 end 18 18 19 require 'application' 19 require 'application' rescue nil 20 20 21 21 class << helper 22 22 include_all_modules_from ActionView -
railties/lib/initializer.rb
old new 61 61 # in order (view execution order in source). 62 62 def process 63 63 check_ruby_version 64 check_application_file_name 64 65 set_load_path 65 66 66 67 require_frameworks … … 106 107 require 'ruby_version_check' 107 108 end 108 109 110 # Check for application.rb and suggest rename if it exists 111 def check_application_file_name 112 puts 'Please rename app/controllers/application.rb to app/controllers/application_controller.rb' if File.exist?("#{RAILS_ROOT}/app/controllers/application.rb") 113 end 114 109 115 # Set the <tt>$LOAD_PATH</tt> based on the value of 110 116 # Configuration#load_paths. Duplicates are removed. 111 117 def set_load_path -
railties/lib/test_help.rb
old new 1 require_dependency 'application' 1 require_dependency 'application' rescue nil 2 2 3 3 # Make double-sure the RAILS_ENV is set to test, 4 4 # so fixtures are loaded to the right database -
railties/lib/commands/performance/request.rb
old new 1 1 #!/usr/bin/env ruby 2 2 require 'config/environment' 3 require 'application' 3 require 'application' rescue nil 4 4 require 'action_controller/request_profiler' 5 5 6 6 ActionController::RequestProfiler.run(ARGV)