Class: Noticed::Generators::NotifierGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Noticed::Generators::NotifierGenerator
- Includes:
- Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/noticed/notifier_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_abstract_class ⇒ Object
16 17 18 19 |
# File 'lib/generators/noticed/notifier_generator.rb', line 16 def generate_abstract_class return if File.exist?("app/notifiers/application_notifier.rb") template "application_notifier.rb", "app/notifiers/application_notifier.rb" end |
#generate_notification ⇒ Object
21 22 23 |
# File 'lib/generators/noticed/notifier_generator.rb', line 21 def generate_notification template "notifier.rb", "app/notifiers/#{file_path}_notifier.rb" end |