1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

24 commits

Author SHA1 Message Date
Xavier Noria
72cca79d36 adds missing require 2011-06-07 12:06:02 +02:00
Guillermo Iguaran
944aee7bb1 Removing deprecated config.generators in Rails::Railtie 2011-05-25 00:11:56 -05:00
José Valim
afc828828f Remove the ability for engines to serve assets from the public directory. 2011-04-15 19:57:52 +02:00
Gabriel Horner
6c309f04c9 Beef up Rails::Railtie::Configuration docs 2011-03-19 19:53:36 -04:00
R.T. Lechow
737abe4b4d Railties typos. 2011-03-05 11:56:35 +01:00
Santiago Pastorino
ab2bde45f8 Remove require AS::Concern from places where is already in 2010-12-19 19:15:26 -02:00
Santiago Pastorino
13e5a26dbb Fix indentation 2010-12-19 14:00:09 -02:00
Santiago Pastorino
7b875953b8 Use Concern in Rails::Railtie::Configurable 2010-12-19 14:00:09 -02:00
José Valim
49cc01002e Be more explicit about what is deprecated. 2010-10-02 09:40:54 -07:00
José Valim
04cbabb0a0 Deprecate generators in Railties. You should use app_generators instead. 2010-10-02 18:38:23 +02:00
Piotr Sarnacki
f851352318 Added config.app_generators to allow configuring application's generators from railties.
With config.generators becomes a way to configure generators
for current instance only. For example:

module Blog
  class Engine < Rails::Engine
    config.generators do |g|
      g.orm :active_record
    end

    config.app_generators do |g|
      g.test_framework :rspec
    end
  end
end

such definition sets :active_record as orm for engine and :rspec
as test_framework for application. The values set with app_generators
can be overwritten in application using config.generators as you would
normally do:

module MyApp
  class Application < Rails::Application
    config.generators do |g|
      g.test_framework :test_unit
    end
  end
end
2010-09-30 09:47:06 +02:00
Piotr Sarnacki
8284fd3855 Get rid of static_paths method and instead configure paths for ActionDispatch::Static in initializers 2010-09-03 22:59:12 +02:00
Piotr Sarnacki
32a5b49911 Move singleton pattern to Railtie and remove Engine::Configurable and Application::Configurable in favor of unified Railtie::Configurable 2010-09-03 22:59:05 +02:00
Piotr Sarnacki
092b148b21 Engine can now serve files with ActionDispatch::Static 2010-09-03 22:59:04 +02:00
José Valim
99b38f371a Move AD::Cascade to the bottom of the middleware stack. 2010-05-16 12:03:11 +02:00
José Valim
3afdfc35e8 Expose remaining hooks to minimize the need for a Railtie based on feedback from plugin developers. 2010-05-16 00:36:46 +02:00
wycats
9cfeefb637 Reorganized initializers a bit to enable better hooks for common cases 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.
2010-05-15 06:09:07 -07:00
José Valim
395d6648ce Move application configuration to the application configuration object, remove railtie_name and engine_name and allow to set the configuration object. 2010-03-26 18:47:55 +01:00
Carlhuda
ae93789d9a Move middlewares to the Application level. If you want to modify the middleware, either use Rails.application.config.middleware or modify it in an initializer (if you need to set it relative to user-specified middleware). 2010-03-08 11:40:51 -08:00
Carlhuda
e311622e7b Deprecated ActionController::Base.session_options= and ActionController::Base.session_store= in favor of a config.session_store method (which takes params) and a config.cookie_secret variable, which is used in various secret scenarios. The old AC::Base options will continue to work with deprecation warnings. 2010-03-04 16:05:52 -08:00
Carlhuda
1776969627 Move session and session_store onto ActionDispatch and add deprecation warnings 2010-03-04 11:58:30 -08:00
Carl Lerche
cc789ddc89 No need for a module if it's only being included once into an empty class. 2010-03-04 09:56:40 -08:00
José Valim
b17e358e3d Move configuration to subfolders. 2010-01-23 22:30:17 +01:00
José Valim
788fce2550 Create configurable modules and ensure that they are added only on direct children. 2010-01-23 18:41:53 +01:00