diff options
author | José Valim <jose.valim@gmail.com> | 2011-09-02 03:05:49 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-09-02 03:05:49 -0700 |
commit | 36f1612c34577225d1f71c368e70c234d5197707 (patch) | |
tree | 2e53e6699aa339e0039f6fb4041d207b0015ca4c | |
parent | 6f3c6992c529a09c8f8bfdb1f714bb8ff1e23300 (diff) | |
parent | e61d6afbab24163d37a73b25262ef73119b99a78 (diff) | |
download | rails-36f1612c34577225d1f71c368e70c234d5197707.tar.gz rails-36f1612c34577225d1f71c368e70c234d5197707.tar.bz2 rails-36f1612c34577225d1f71c368e70c234d5197707.zip |
Merge pull request #2811 from avakhov/fix-environment-generator-action
fix indent for generator environment method
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/actions_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index b8541c236e..a7462f39ba 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -97,7 +97,7 @@ module Rails in_root do if options[:env].nil? - inject_into_file 'config/application.rb', "\n #{data}", :after => sentinel, :verbose => false + inject_into_file 'config/application.rb', "\n #{data}", :after => sentinel, :verbose => false else Array.wrap(options[:env]).each do |env| inject_into_file "config/environments/#{env}.rb", "\n #{data}", :after => env_file_sentinel, :verbose => false diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index e4a8000425..56cb53c1ad 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -106,7 +106,7 @@ class ActionsTest < Rails::Generators::TestCase run_generator autoload_paths = 'config.autoload_paths += %w["#{Rails.root}/app/extras"]' action :environment, autoload_paths - assert_file 'config/application.rb', /#{Regexp.escape(autoload_paths)}/ + assert_file 'config/application.rb', / class Application < Rails::Application\n #{Regexp.escape(autoload_paths)}/ end def test_environment_should_include_data_in_environment_initializer_block_with_env_option |