Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit 0d48b12fc56df574bb81cfaf0f5fb4713e9230fc 1 parent b14d1cd
@dabit dabit authored drogus committed
View
2  railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb
@@ -302,7 +302,7 @@ def application_definition
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
Please sign in to comment.
Something went wrong with that request. Please try again.