mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Move the ActiveRecord generator settings into the Railtie
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user