1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Don't normalize original_app_name

`original_app_name` is used to show error message if giving app name is
invalid, it should be shown raw app name.
This commit is contained in:
Ryuta Kamizono 2019-04-03 17:56:04 +09:00
parent 1799d91035
commit fe006083ea

View file

@ -7,11 +7,11 @@ module Rails
private
def app_name
@app_name ||= original_app_name.tr("-", "_")
@app_name ||= original_app_name.tr('\\', "").tr("-. ", "_")
end
def original_app_name
@original_app_name ||= (defined_app_const_base? ? defined_app_name : File.basename(destination_root)).tr('\\', "").tr(". ", "_")
@original_app_name ||= defined_app_const_base? ? defined_app_name : File.basename(destination_root)
end
def defined_app_name