Class: Bootstrap::Generators::DeviseGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bootstrap::Generators::DeviseGenerator
- Includes:
- BootstrapViewsGenerator::Helpers
- Defined in:
- lib/generators/bootstrap/devise_generator.rb
Instance Method Summary collapse
- #copy_confirmation ⇒ Object
- #copy_mailers ⇒ Object
- #copy_passwords ⇒ Object
- #copy_registrations ⇒ Object
- #copy_sessions ⇒ Object
-
#copy_shared ⇒ Object
Copy shared files that have no meta-tags or template associated with them.
- #copy_unlock ⇒ Object
Methods included from BootstrapViewsGenerator::Helpers
Instance Method Details
#copy_confirmation ⇒ Object
19 20 21 |
# File 'lib/generators/bootstrap/devise_generator.rb', line 19 def copy_confirmation template "#{file_template_location('confirmations/new')}.tt", "app/views/devise/confirmations/new.html.#{[:template_engine]}" end |
#copy_mailers ⇒ Object
23 24 25 |
# File 'lib/generators/bootstrap/devise_generator.rb', line 23 def copy_mailers directory "#{[:template_engine]}/mailer", 'app/views/devise/mailer' end |
#copy_passwords ⇒ Object
27 28 29 30 31 |
# File 'lib/generators/bootstrap/devise_generator.rb', line 27 def copy_passwords %i[edit new].map do |file| template "#{file_template_location("passwords/#{file}")}.tt", "app/views/devise/passwords/#{file}.html.#{[:template_engine]}" end end |
#copy_registrations ⇒ Object
33 34 35 36 37 |
# File 'lib/generators/bootstrap/devise_generator.rb', line 33 def copy_registrations %i[edit new].map do |file| template "#{file_template_location("registrations/#{file}")}.tt", "app/views/devise/registrations/#{file}.html.#{[:template_engine]}" end end |
#copy_sessions ⇒ Object
39 40 41 |
# File 'lib/generators/bootstrap/devise_generator.rb', line 39 def copy_sessions template "#{file_template_location('sessions/new')}.tt", "app/views/devise/sessions/new.html.#{[:template_engine]}" end |
#copy_shared ⇒ Object
Copy shared files that have no meta-tags or template associated with them
48 49 50 |
# File 'lib/generators/bootstrap/devise_generator.rb', line 48 def copy_shared directory "#{[:template_engine]}/shared", 'app/views/devise/shared' end |
#copy_unlock ⇒ Object
43 44 45 |
# File 'lib/generators/bootstrap/devise_generator.rb', line 43 def copy_unlock template "#{[:template_engine]}/unlocks/new.html.#{[:template_engine]}.tt", "app/views/devise/unlocks/new.html.#{[:template_engine]}" end |