diff options
Diffstat (limited to 'railties/lib/rails/generators')
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb | 10 | ||||
-rwxr-xr-x | railties/lib/rails/generators/rails/plugin_new/templates/Rakefile | 6 |
2 files changed, 1 insertions, 15 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb index 77497f9e44..9c54b98238 100644 --- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb @@ -70,16 +70,6 @@ task :default => :test if mountable? template "rails/routes.rb", "#{dummy_path}/config/routes.rb", :force => true end - - if full? && !options[:skip_active_record] - append_file "#{dummy_path}/Rakefile", <<-EOF - -task :"db:load_config" do - ActiveRecord::Migrator.migrations_paths = Rails.application.config.paths["db/migrate"].to_a + - <%= camelized %>::Engine.config.paths["db/migrate"].to_a -end - EOF - end end def test_dummy_clean diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile index b7cab3859a..25292f59ad 100755 --- a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile +++ b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile @@ -17,12 +17,8 @@ end <% if full? && !options[:skip_active_record] -%> namespace :app do + ENGINE_PATH = File.expand_path("..", __FILE__) load File.expand_path("../<%= dummy_path -%>/Rakefile", __FILE__) - - task :"db:load_config" do - ActiveRecord::Migrator.migrations_paths = Rails.application.config.paths["db/migrate"].to_a + - <%= camelized %>::Engine.config.paths["db/migrate"].to_a - end end <% end -%> |