Class: AuthAssist::Generators::ViewsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/auth_assist/views/views_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



12
13
14
# File 'lib/generators/auth_assist/views/views_generator.rb', line 12

def self.source_root
  @_devise_source_root ||= File.expand_path("../../../../app/views", __FILE__)
end

Instance Method Details

#copy_viewsObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/generators/auth_assist/views/views_generator.rb', line 16

def copy_views
  case options[:template_engine]
  when "haml"
    verify_haml_existence
    verify_haml_version
    create_and_copy_haml_views
  else
    directory "auth_assist", "app/views/#{scope || 'devise'}"
  end
end