mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-22 13:18:05 -05:00
Allow to give a scope when copying views.
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
class DeviseViewsGenerator < Rails::Generators::Base
|
||||
desc "Copies all Devise views to your application."
|
||||
|
||||
argument :scope, :required => false, :default => nil,
|
||||
:desc => "The scope to copy views to"
|
||||
|
||||
def self.source_root
|
||||
@_devise_source_root ||= File.expand_path("../../../../app/views", __FILE__)
|
||||
end
|
||||
|
||||
def copy_views
|
||||
directory "devise", "app/views/devise"
|
||||
end
|
||||
|
||||
def say_restart_server
|
||||
say "Views copied. Please restart your server."
|
||||
directory "devise", "app/views/devise/#{scope}"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user