Class: Rodauth::Rails::Generators::MailerGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Rodauth::Rails::Generators::MailerGenerator
- Defined in:
- lib/generators/rodauth/mailer_generator.rb
Constant Summary collapse
- VIEWS =
%w[ email_auth password_changed reset_password unlock_account verify_account verify_login_change ]
Instance Method Summary collapse
Instance Method Details
#copy_mailer ⇒ Object
23 24 25 26 |
# File 'lib/generators/rodauth/mailer_generator.rb', line 23 def copy_mailer template "app/mailers/rodauth_mailer.rb", "app/mailers/#{[:name].underscore}_mailer.rb" end |
#copy_mailer_views ⇒ Object
28 29 30 31 32 33 |
# File 'lib/generators/rodauth/mailer_generator.rb', line 28 def copy_mailer_views VIEWS.each do |view| template "app/views/rodauth_mailer/#{view}.text.erb", "app/views/#{[:name].underscore}_mailer/#{view}.text.erb" end end |