Underscore the app_name before classifying it.
Fixes invalid constant if your app name has a dash in it. 'rails-upgrade'.classify # => Rails-upgrade 'rails-upgrade'.underscore.classify # => RailsUpgrade
This commit is contained in:
parent
e08de4f169
commit
ce22c72ee8
@ -327,7 +327,7 @@ module Rails
|
||||
r.to_route_code
|
||||
end.join("\n")
|
||||
|
||||
"#{app_name.classify}::Application.routes.draw do\n#{@new_code}\nend\n"
|
||||
"#{app_name.underscore.classify}::Application.routes.draw do\n#{@new_code}\nend\n"
|
||||
end
|
||||
|
||||
private
|
||||
|
Loading…
Reference in New Issue
Block a user