Browse files

Move the ActiveRecord generator settings into the Railtie

  • Loading branch information...
1 parent e7418ab commit f15bbcf97ee09d431e3ad347beb3fd31a411dda2 Carl Lerche committed Jan 28, 2010
View
3 activerecord/lib/active_record/railtie.rb
@@ -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
7 railties/lib/rails/generators.rb
@@ -38,11 +38,6 @@ module Generators
}
DEFAULT_OPTIONS = {
- :active_record => {
- :migration => true,
- :timestamps => true
- },
-
:erb => {
:layout => true
},
@@ -51,7 +46,7 @@ module Generators
:force_plural => false,
:helper => true,
:layout => true,
- :orm => :active_record,
+ :orm => nil,
:integration_tool => nil,
:performance_tool => nil,
:resource_controller => :controller,
View
2 railties/test/application/generators_test.rb
@@ -34,7 +34,7 @@ def with_bare_config
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
1 railties/test/railties/engine_test.rb
@@ -25,6 +25,7 @@ def reload_config
end
test "Rails::Engine itself does not respond to config" do
+ boot_rails
assert !Rails::Engine.respond_to?(:config)
end
end
View
1 railties/test/railties/plugin_test.rb
@@ -20,6 +20,7 @@ def reload_config
end
test "Rails::Plugin itself does not respond to config" do
+ boot_rails
assert !Rails::Plugin.respond_to?(:config)
end

1 comment on commit f15bbcf

@rubys

rake db:sessions:create
no value provided for required options '--orm'

Please sign in to comment.