aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix assets prefix joiningJoshua Peek2011-03-301-1/+1
|
* Fix assets prefix joiningJoshua Peek2011-03-301-1/+1
|
* Unify sprockets config optionsJoshua Peek2011-03-301-11/+13
|
* Merge branch 'master' into sprocketsJoshua Peek2011-03-301-4/+13
|\ | | | | | | | | Conflicts: railties/lib/rails/application/configuration.rb
| * Add `config.force_ssl` configuration which will load `Rack::SSL` middleware ↵Prem Sichanugrist2011-03-271-4/+13
| | | | | | | | | | | | | | | | if set to true This will allow user to be able to force all requests to be under HTTPS protocol. This commit was a request from DHH. Special thanks to Josh Peek as well for making `Rack::SSL`.
* | Rename option to config.asset_pipelineJoshua Peek2011-03-291-11/+13
| |
* | Move sprockets initializers back to applicationJoshua Peek2011-03-291-0/+27
| |
* | Add route for assetsJoshua Peek2011-03-281-34/+0
| |
* | Change static root to /publicJoshua Peek2011-03-221-1/+1
| |
* | Move app/javascripts and app/stylesheets under app/assetsJoshua Peek2011-03-221-6/+6
| |
* | Remove ensure_fresh_assets flagJoshua Peek2011-03-221-1/+0
| |
* | Assign sprockets static rootJoshua Peek2011-03-221-0/+1
| |
* | Add sprockets environment to ApplicationJoshua Peek2011-03-211-0/+34
|/
* Always use ActionDispatch::ShowExceptions middleware [#6462 state:resolved]Prem Sichanugrist2011-02-251-1/+1
| | | | This will make sure the application will raise `ActionController::RoutingError` in case "X-Cascade: pass" header was set, usually when there's no route match.
* Make sure that we set `env["action_dispatch.show_exceptions"]`Prem Sichanugrist2011-02-251-1/+2
| | | | This has been used by `show_exception` middleware even the setting wasn't get passed to `env` hash.
* Application's assets should have higher priority than engine's onesPiotr Sarnacki2011-02-091-1/+4
| | | | [#6388 state:resolved]
* Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepareJohn Firebaugh2010-12-201-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* 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;