mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixes issue #6251
Plugin generator crashes when using the --dummy-path option Code was assuming the application name in `config/application.rb` was module Dummy.
This commit is contained in:
parent
b14d1cd8ae
commit
0d48b12fc5
1 changed files with 1 additions and 1 deletions
|
@ -302,7 +302,7 @@ task :default => :test
|
|||
dummy_application_path = File.expand_path("#{dummy_path}/config/application.rb", destination_root)
|
||||
unless options[:pretend] || !File.exists?(dummy_application_path)
|
||||
contents = File.read(dummy_application_path)
|
||||
contents[(contents.index("module Dummy"))..-1]
|
||||
contents[(contents.index(/module ([\w]+)\n(.*)class Application/m))..-1]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue