aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce ActionDispatch::ReloaderJohn Firebaugh2010-12-201-0/+1
| | | | | | | | | | | | Based on the implementation on the 2-3-stable branch, patches by Hongli Lai <hongli@phusion.nl>, and helpful suggestions from José Valim. Hongli Lai's patches included locking around the request cycle; this is now handled by Rack::Lock (https://github.com/rack/rack/issues/issue/87/). [#2873] Signed-off-by: José Valim <jose.valim@gmail.com>
* Ensure asset_path defaults to nil for applicationJosé Valim2010-12-091-0/+4
|
* Remove unused Configurable in Rails::Engine and Rails::Application. Remove ↵zhengjia2010-11-111-1/+0
| | | | | | unnecessary railties load path in cli [#5871 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* replace if ! with unlessNeeraj Singh2010-10-171-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Makes this code a bit more clearSantiago Pastorino2010-10-081-3/+3
|
* Remove the final initializers since initializers += will return it anyway. ↵Ryan Bigg2010-10-081-1/+0
| | | | | | [#3892 state:resolved] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Provide a cleaner syntax for paths configuration that does not rely on ↵José Valim2010-10-061-1/+1
| | | | method_missing.
* Move ETag and ConditionalGet logic from AD::Response to the middleware stack.José Valim2010-10-031-1/+3
|
* reload_routes! is part of the public API and should not be removed.José Valim2010-10-021-0/+4
|
* Moved Rails::RoutesReloader to Rails::Application::RoutesReloaderPiotr Sarnacki2010-09-301-2/+2
|
* Move routes_reloader to a class: RoutesReloaderPiotr Sarnacki2010-09-301-22/+2
|
* Properly reload routes defined in class definitionPiotr Sarnacki2010-09-301-5/+16
| | | | | | | | | | | | | | | | | Sometimes it's easier to define routes inside Engine or Application class definition (e.g. one file applications). The problem with such case is that if there is a plugin that has config/routes.rb file, it will trigger routes reload on application. Since routes definition for application is not in config/routes.rb file routes_reloader will fail to reload application's routes properly. With this commit you can pass routes definition as a block to routes method, which will allow to properly reload it: class MyApp::Application < Rails::Application routes do resources :users end end
* Only add Rack::Cache to the middleware stack if ↵Sparky2010-09-151-2/+4
| | | | config.action_controller.perform_caching is set.
* First pass at Rack::Cachewycats2010-09-131-0/+3
|
* Get rid of static_paths method and instead configure paths for ↵Piotr Sarnacki2010-09-031-17/+1
| | | | ActionDispatch::Static in initializers
* Engine's assets are now served with ActionDispatch::StaticPiotr Sarnacki2010-09-031-1/+17
|
* Added ability to set asset_path for enginesPiotr Sarnacki2010-09-031-9/+5
|
* Ensure that Rails.application.initialize! is called only oncePiotr Sarnacki2010-09-031-0/+2
|
* New way of generating urls for Application from Engine.Piotr Sarnacki2010-09-031-5/+2
| | | | | | | | | It's based specifying application's script_name with: Rails.application.default_url_options = {:script_name => "/foo"} default_url_options method is delegated to routes. If router used to generate url differs from the router passed via env it always overwrites :script_name with this value.
* Fix url generation for mounted EnginePiotr Sarnacki2010-09-031-2/+8
| | | | | | | | | I added integration tests for generating urls in Engine and application and tweaked Engines to fully cooparate with new router's behavior: * Rails.application now sets ORIGINAL_SCRIPT_NAME * Rails.application also sets its routes as env['action_dispatch.parent_routes'] * Engine implements responds_to? class method to respond to all the instance methods, like #routes
* Pass routes via env['action_dispatch.routes'], it's needed by routes to ↵Piotr Sarnacki2010-09-031-2/+2
| | | | determine if it should generate prefix for mounted apps
* Move singleton pattern to Railtie and remove Engine::Configurable and ↵Piotr Sarnacki2010-09-031-25/+4
| | | | Application::Configurable in favor of unified Railtie::Configurable
* Allow Engines loading its own environment file from config/environmentsPiotr Sarnacki2010-09-031-4/+0
|
* We don't need to add railties initlaizers in Application as there is already ↵Piotr Sarnacki2010-09-031-1/+0
| | | | done in Engine and it's called with super
* Removed ActionDispatch::Static, but left empty MiddlewareStack to unify app ↵Piotr Sarnacki2010-09-031-6/+0
| | | | method between Engine and Application
* Engine sets routes as default rack endpoint if no endpoint was givenPiotr Sarnacki2010-09-031-4/+0
|
* Delegate non existing class methods to instance for EnginePiotr Sarnacki2010-09-031-5/+0
|
* Improve best_standards_support to use only IE=Edge in development modewycats2010-08-091-1/+1
|
* Add a header that tells Internet Explorer (all versions) to use the best ↵wycats2010-07-271-0/+1
| | | | | | available standards support. This ensures that IE doesn't go into quirks mode because it has been blacklisted by too many users pressing the incompatible button. It also tells IE to use the ChromeFrame renderer, if the user has installed the plugin. This guarantees that the best available standards support will be used on the client.
* Add console hook to force ActiveRecord::Base to be loaded when console ↵José Valim2010-07-181-0/+13
| | | | starts avoiding reference loops.
* reload_routes! was still referencing old Rails::Application.José Valim2010-07-021-6/+5
|
* Avoid calls to Rails::Application since this is not the official API.José Valim2010-07-011-8/+4
| | | | Your application should *always* reference your application const (as Blog::Application) and Rails.application should be used just internally.
* A few changes were done in this commit:José Valim2010-06-281-6/+1
| | | | | | * Added :autoload to engines path API and redefine usage to be in sync with 6f83a5036d8a9c3f8ed7; * Do not autoload code in *lib* for applications (now you need to explicitly require them). This makes an application behave closer to an engine (code in lib is still autoloaded for plugins); * Always autoload code in app/ for engines and plugins. This makes engines behave closer to an application and should allow us to get rid of the unloadable hack required when controllers inside engines inherit from ApplicationController;
* Move Collection responsibility from application to initializableJeremy Kemper2010-06-241-1/+1
|
* Speed up boot by tsorting as infrequently as possibleJeremy Kemper2010-06-241-1/+1
|
* renames load_(once_)paths to autoload_(once_)paths in dependencies and configXavier Noria2010-06-241-2/+2
|
* Alias app to build_middleware_stack for clarity.José Valim2010-06-211-0/+1
|
* Use the new ActiveSupport::FileUpdateChecker instead of RoutesReloader.José Valim2010-06-201-3/+10
|
* Improve documentation for add_lib_to_load_paths!José Valim2010-06-201-3/+16
|
* Add lib to load paths when application is inherited to be able to load lib ↵José Valim2010-06-021-0/+11
| | | | code during configuration.
* Remove the laziness from the middleware stack.José Valim2010-05-291-1/+27
|
* Removing Metal from Rails 3. wycats2010-05-291-6/+4
| | | | | | | | | | | | | | | | | | | | If you have existing Metals, you have a few options: * if your metal behaves like a middleware, add it to the middleware stack via config.middleware.use. You can use methods on the middleware stack to control exactly where it should go * if it behaves like a Rack endpoint, you can link to it in the router. This will result in more optimal routing time, and allows you to remove code in your endpoint that matches specific URLs in favor of the more powerful handling in the router itself. For the future, you can use ActionController::Metal to get a very fast controller with the ability to opt-in to specific controller features without paying the penalty of the full controller stack. Since Rails 3 is closer to Rack, the Metal abstraction is no longer needed.
* Expose remaining hooks to minimize the need for a Railtie based on feedback ↵José Valim2010-05-161-1/+0
| | | | from plugin developers.
* Reorganized initializers a bit to enable better hooks for common cases ↵wycats2010-05-151-4/+6
| | | | | | | | | | | | | | | without the need for Railtie. Specifically, the following hooks were added: * before_configuration: this hook is run immediately after the Application class comes into existence, but before the user has added any configuration. This is the appropriate place to set configuration for your plugin * before_initialize: This is run after all of the user's configuration has completed, but before any initializers have begun (in other words, it runs right after config/environments/{development,production,test}.rb) * after_initialize: This is run after all of the initializers have run. It is an appropriate place for forking in a preforking setup Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie.
* The rake task :environment now loads config/environment.rb instead of ↵José Valim2010-04-291-2/+2
| | | | initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks.
* Ensure application rake tasks and generators are loaded after the ones ↵José Valim2010-04-261-2/+2
| | | | specified in railties/engines/rails. [#4471 state:resolved]
* Rename config.cookie_secret to config.secret_token and pass it as ↵José Valim2010-04-051-2/+9
| | | | configuration in request.env. This is another step forward removing global configuration.
* Merge branch 'master' into docrailswycats2010-03-261-1/+2
|\
| * Move application configuration to the application configuration object, ↵José Valim2010-03-261-0/+2
| | | | | | | | remove railtie_name and engine_name and allow to set the configuration object.
| * Move railties/builtin into libJoshua Peek2010-03-201-1/+0
| |