Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/generators/rename/shared/common_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def validate_name_and_path?
raise Thor::Error, '[Error] Please give a name which does not match any of the reserved Rails keywords.'
elsif Object.const_defined?(@new_module_name)
raise Thor::Error, "[Error] Constant '#{@new_module_name}' is already in use, please choose another name."
elsif file_exist?(@new_path)
elsif file_exist?(@new_path) && @new_path != Rails.root.to_s
raise Thor::Error, "[Error] Folder '#{@new_dir}' already in use, please choose another name."
end
end
Expand Down