Class: Wupee::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Wupee::InstallGenerator
- Defined in:
- lib/generators/wupee/install/install_generator.rb
Instance Method Summary collapse
- #add_subject_locale ⇒ Object
- #add_wupee_routes ⇒ Object
- #copy_initializer ⇒ Object
- #copy_notifications_mailer ⇒ Object
Instance Method Details
#add_subject_locale ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/generators/wupee/install/install_generator.rb', line 16 def add_subject_locale append_file "config/locales/#{I18n.locale.to_s}.yml" do <<-CODE wupee: email_subjects: CODE end end |
#add_wupee_routes ⇒ Object
8 9 10 |
# File 'lib/generators/wupee/install/install_generator.rb', line 8 def add_wupee_routes route 'mount Wupee::Engine, at: "/wupee"' end |
#copy_initializer ⇒ Object
12 13 14 |
# File 'lib/generators/wupee/install/install_generator.rb', line 12 def copy_initializer template "wupee.rb", "config/initializers/wupee.rb" end |
#copy_notifications_mailer ⇒ Object
4 5 6 |
# File 'lib/generators/wupee/install/install_generator.rb', line 4 def copy_notifications_mailer template "notifications_mailer.rb", "app/mailers/notifications_mailer.rb" end |