Class: Noticed::Generators::DeliveryMethodGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::ResourceHelpers
Defined in:
lib/generators/noticed/delivery_method_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_notificationObject



16
17
18
19
20
21
22
23
24
# File 'lib/generators/noticed/delivery_method_generator.rb', line 16

def generate_notification
  if options[:bulk]
    template "application_bulk_delivery_method.rb", "app/notifiers/application_bulk_delivery_method.rb"
    template "bulk_delivery_method.rb", "app/notifiers/bulk_delivery_methods/#{singular_name}.rb"
  else
    template "application_delivery_method.rb", "app/notifiers/application_delivery_method.rb"
    template "delivery_method.rb", "app/notifiers/delivery_methods/#{singular_name}.rb"
  end
end