mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Renamed AbstractApplicationController and abstract_application.rb to ApplicationController and application.rb, so that it will be possible for the framework to automatically pick up on app/views/layouts/application.rhtml and app/helpers/application.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
a02a96226e
commit
4d9cda5732
7 changed files with 12 additions and 10 deletions
|
@ -1,5 +1,8 @@
|
|||
*CVS*
|
||||
|
||||
* Renamed AbstractApplicationController and abstract_application.rb to ApplicationController and application.rb, so that it will be possible
|
||||
for the framework to automatically pick up on app/views/layouts/application.rhtml and app/helpers/application.rb
|
||||
|
||||
* Added script/envcon that makes it even easier to start an IRB session for interacting with the domain model. Run with no-args to
|
||||
see help.
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ end
|
|||
# :link_apache_config
|
||||
desc "Make copies of all the default content of ties"
|
||||
task :copy_ties_content => [
|
||||
:copy_rootfiles, :copy_dispatches, :copy_html_files, :copy_abstract_application,
|
||||
:copy_rootfiles, :copy_dispatches, :copy_html_files, :copy_application,
|
||||
:copy_configs, :copy_generators, :copy_binfiles, :copy_test_helpers, :copy_docs_in_public,
|
||||
:copy_app_doc_readme ]
|
||||
|
||||
|
@ -121,8 +121,8 @@ task :copy_html_files do
|
|||
File.join(PKG_DESTINATION, 'public')
|
||||
end
|
||||
|
||||
task :copy_abstract_application do
|
||||
cp "helpers/abstract_application.rb", "#{PKG_DESTINATION}/app/controllers/abstract_application.rb"
|
||||
task :copy_application do
|
||||
cp "helpers/application.rb", "#{PKG_DESTINATION}/app/controllers/application.rb"
|
||||
cp "helpers/application_helper.rb", "#{PKG_DESTINATION}/app/helpers/application_helper.rb"
|
||||
end
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class <%= class_name %>Controller < AbstractApplicationController
|
||||
class <%= class_name %>Controller < ApplicationController
|
||||
<% if options[:scaffold] -%>
|
||||
scaffold :<%= singular_name %>
|
||||
<% end -%>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class <%= class_name %>Controller < AbstractApplicationController
|
||||
class <%= class_name %>Controller < ApplicationController
|
||||
model :<%= singular_name %>
|
||||
layout 'scaffold'
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
# The filters added to this controller will be run for all controllers in the application.
|
||||
# Likewise will all the methods added be available for all controllers.
|
||||
class AbstractApplicationController < ActionController::Base
|
||||
helper :application
|
||||
class ApplicationController < ActionController::Base
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
ENV["RAILS_ENV"] ||= "test"
|
||||
require File.dirname(__FILE__) + "/../config/environment"
|
||||
require 'abstract_application'
|
||||
require 'application'
|
||||
|
||||
require 'test/unit'
|
||||
require 'active_record/fixtures'
|
||||
|
|
|
@ -35,7 +35,7 @@ class Dispatcher
|
|||
|
||||
controller_name, module_name = controller_name(request.parameters), module_name(request.parameters)
|
||||
|
||||
require_dependency("abstract_application")
|
||||
require_dependency("application")
|
||||
require_dependency(controller_path(controller_name, module_name))
|
||||
|
||||
controller_class(controller_name).process(request, response).out
|
||||
|
@ -43,7 +43,7 @@ class Dispatcher
|
|||
ActionController::Base.process_with_exception(request, response, exception).out
|
||||
ensure
|
||||
if ActionController::Base.reload_dependencies
|
||||
Object.send(:remove_const, "AbstractApplicationController") if Object.const_defined?(:AbstractApplicationController)
|
||||
Object.send(:remove_const, "ApplicationController") if Object.const_defined?(:ApplicationController)
|
||||
Object.send(:remove_const, controller_class_name(controller_name)) if Object.const_defined?(controller_class_name(controller_name))
|
||||
ActiveRecord::Base.reset_associations_loaded
|
||||
ActiveRecord::Base.reset_column_information_and_inheritable_attributes_for_all_subclasses
|
||||
|
|
Loading…
Reference in a new issue