Skip to content

Commit

Permalink
Merge pull request #4348 from lest/change-array-wrap
Browse files Browse the repository at this point in the history
use Kernel#Array instead of Array.wrap in Rails::Generators::Actions
  • Loading branch information
josevalim committed Jan 6, 2012
2 parents fc95642 + dcb818c commit 5b9c8a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions railties/lib/rails/generators/actions.rb
@@ -1,6 +1,5 @@
require 'open-uri'
require 'rbconfig'
require 'active_support/core_ext/array/wrap'

module Rails
module Generators
Expand Down Expand Up @@ -92,7 +91,7 @@ def environment(data=nil, options={}, &block)
if options[:env].nil?
inject_into_file 'config/application.rb', "\n #{data}", :after => sentinel, :verbose => false
else
Array.wrap(options[:env]).each do |env|
Array(options[:env]).each do |env|
inject_into_file "config/environments/#{env}.rb", "\n #{data}", :after => env_file_sentinel, :verbose => false
end
end
Expand Down

0 comments on commit 5b9c8a5

Please sign in to comment.