Move the ActiveRecord generator settings into the Railtie

This commit is contained in:
Carl Lerche
2010-01-28 10:45:25 -08:00
parent e7418ab63c
commit f15bbcf97e
5 changed files with 7 additions and 7 deletions

View File

@@ -10,6 +10,9 @@ module ActiveRecord
class Railtie < Rails::Railtie
railtie_name :active_record
config.generators.orm :active_record, :migration => true,
:timestamps => true
rake_tasks do
load "active_record/railties/databases.rake"
end

View File

@@ -38,11 +38,6 @@ module Rails
}
DEFAULT_OPTIONS = {
:active_record => {
:migration => true,
:timestamps => true
},
:erb => {
:layout => true
},
@@ -51,7 +46,7 @@ module Rails
:force_plural => false,
:helper => true,
:layout => true,
:orm => :active_record,
:orm => nil,
:integration_tool => nil,
:performance_tool => nil,
:resource_controller => :controller,

View File

@@ -34,7 +34,7 @@ module ApplicationTests
end
test "generators set rails options" do
with_config do |c|
with_bare_config do |c|
c.generators.orm = :datamapper
c.generators.test_framework = :rspec
c.generators.helper = false

View File

@@ -25,6 +25,7 @@ module RailtiesTest
end
test "Rails::Engine itself does not respond to config" do
boot_rails
assert !Rails::Engine.respond_to?(:config)
end
end

View File

@@ -20,6 +20,7 @@ module RailtiesTest
end
test "Rails::Plugin itself does not respond to config" do
boot_rails
assert !Rails::Plugin.respond_to?(:config)
end