diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-29 17:41:30 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-30 09:47:06 +0200 |
commit | f851352318c7468db310e5fbea0d86dc8b731c6d (patch) | |
tree | 4d040546fdc495c1f79b580d42c1e3236e5063d1 /activerecord | |
parent | 57aa79e6bedeffcff899688546ef0a508948b4a5 (diff) | |
download | rails-f851352318c7468db310e5fbea0d86dc8b731c6d.tar.gz rails-f851352318c7468db310e5fbea0d86dc8b731c6d.tar.bz2 rails-f851352318c7468db310e5fbea0d86dc8b731c6d.zip |
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
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/railtie.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 94dda4e413..868fd6c3ff 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -13,7 +13,7 @@ module ActiveRecord class Railtie < Rails::Railtie config.active_record = ActiveSupport::OrderedOptions.new - config.generators.orm :active_record, :migration => true, + config.app_generators.orm :active_record, :migration => true, :timestamps => true config.app_middleware.insert_after "::ActionDispatch::Callbacks", |