mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Simplify the view generator with scoped views
This commit is contained in:
parent
bbbff3a350
commit
14a3084b59
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ module Devise
|
||||||
def view_directory(name, _target_path = nil)
|
def view_directory(name, _target_path = nil)
|
||||||
directory name.to_s, _target_path || "#{target_path}/#{name}" do |content|
|
directory name.to_s, _target_path || "#{target_path}/#{name}" do |content|
|
||||||
if scope
|
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
|
else
|
||||||
content
|
content
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue