Skip to content

Commit

Permalink
Simplify the view generator with scoped views
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed Jun 7, 2020
1 parent bbbff3a commit 14a3084
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/devise/views_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def copy_views
def view_directory(name, _target_path = nil)
directory name.to_s, _target_path || "#{target_path}/#{name}" do |content|
if scope
content.gsub("devise/shared/links", "#{plural_scope}/shared/links").gsub("devise/shared/error_messages", "#{plural_scope}/shared/error_messages")
content.gsub("devise/shared", "#{plural_scope}/shared")
else
content
end
Expand Down

0 comments on commit 14a3084

Please sign in to comment.