mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Made sure no deprecated HAML templates (in case any) will get copied over.
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
@@ -42,6 +42,9 @@ class DeviseViewsGenerator < Rails::Generators::Base
|
||||
devise_html_source_root = "#{DeviseViewsGenerator.source_root}/devise"
|
||||
devise_haml_source_root = "#{DeviseViewsGenerator.source_root}/devise-haml"
|
||||
|
||||
# reset the ghost folder so that no deprecated files (if any) will get copied across
|
||||
FileUtils.remove_dir devise_haml_source_root, true
|
||||
|
||||
Dir["#{devise_html_source_root}/**/*"].each do |path|
|
||||
relative_path = path.sub(devise_html_source_root, "")
|
||||
source_path = (devise_haml_source_root + relative_path).sub(/erb$/, "haml")
|
||||
|
||||
Reference in New Issue
Block a user