Class: Semantic::Generators::DeviseGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/semantic/devise_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_confirmationObject



14
15
16
# File 'lib/generators/semantic/devise_generator.rb', line 14

def copy_confirmation
  template "#{file_template_location('confirmations/new')}.tt", "app/views/devise/confirmations/new.html.#{options[:template_engine]}"
end

#copy_mailersObject



18
19
20
# File 'lib/generators/semantic/devise_generator.rb', line 18

def copy_mailers
  directory "#{options[:template_engine]}/mailer", 'app/views/devise/mailer'
end

#copy_passwordsObject



22
23
24
25
26
# File 'lib/generators/semantic/devise_generator.rb', line 22

def copy_passwords
  %i[edit new].map do |file|
    template "#{file_template_location("passwords/#{file}")}.tt", "app/views/devise/passwords/#{file}.html.#{options[:template_engine]}"
  end
end

#copy_registrationsObject



28
29
30
31
32
# File 'lib/generators/semantic/devise_generator.rb', line 28

def copy_registrations
  %i[edit new].map do |file|
    template "#{file_template_location("registrations/#{file}")}.tt", "app/views/devise/registrations/#{file}.html.#{options[:template_engine]}"
  end
end

#copy_sessionsObject



34
35
36
# File 'lib/generators/semantic/devise_generator.rb', line 34

def copy_sessions
  template "#{file_template_location('sessions/new')}.tt", "app/views/devise/sessions/new.html.#{options[:template_engine]}"
end

#copy_sharedObject

Copy shared files that have no meta-tags or template associated with them



43
44
45
# File 'lib/generators/semantic/devise_generator.rb', line 43

def copy_shared
  directory "#{options[:template_engine]}/shared", 'app/views/devise/shared'
end

#copy_unlockObject



38
39
40
# File 'lib/generators/semantic/devise_generator.rb', line 38

def copy_unlock
  template "#{options[:template_engine]}/unlocks/new.html.#{options[:template_engine]}.tt", "app/views/devise/unlocks/new.html.#{options[:template_engine]}"
end