Class: Semantic::Generators::DeviseGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Semantic::Generators::DeviseGenerator
- Defined in:
- lib/generators/semantic/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
Instance Method Details
#copy_confirmation ⇒ Object
16 17 18 |
# File 'lib/generators/semantic/devise_generator.rb', line 16 def copy_confirmation template "#{file_template_location('confirmations/new')}.tt", "app/views/devise/confirmations/new.html.#{[:template_engine]}" end |
#copy_mailers ⇒ Object
20 21 22 |
# File 'lib/generators/semantic/devise_generator.rb', line 20 def copy_mailers directory "#{[:template_engine]}/mailer", 'app/views/devise/mailer' end |
#copy_passwords ⇒ Object
24 25 26 27 28 |
# File 'lib/generators/semantic/devise_generator.rb', line 24 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
30 31 32 33 34 |
# File 'lib/generators/semantic/devise_generator.rb', line 30 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
36 37 38 |
# File 'lib/generators/semantic/devise_generator.rb', line 36 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
45 46 47 |
# File 'lib/generators/semantic/devise_generator.rb', line 45 def copy_shared directory "#{[:template_engine]}/shared", 'app/views/devise/shared' end |
#copy_unlock ⇒ Object
40 41 42 |
# File 'lib/generators/semantic/devise_generator.rb', line 40 def copy_unlock template "#{[:template_engine]}/unlocks/new.html.#{[:template_engine]}.tt", "app/views/devise/unlocks/new.html.#{[:template_engine]}" end |