lib/rails/generators/actions.rb in railties-4.0.13 vs lib/rails/generators/actions.rb in railties-4.1.0.beta1
- old
+ new
@@ -84,10 +84,10 @@
# environment(nil, env: "development") do
# "config.autoload_paths += %W(#{config.root}/extras)"
# end
def environment(data=nil, options={}, &block)
sentinel = /class [a-z_:]+ < Rails::Application/i
- env_file_sentinel = /::Application\.configure do/
+ env_file_sentinel = /Rails\.application\.configure do/
data = block.call if !data && block_given?
in_root do
if options[:env].nil?
inject_into_file 'config/application.rb', "\n #{data}", after: sentinel, verbose: false