Class: NotifyUser::NotificationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- NotifyUser::NotificationGenerator
- Defined in:
- lib/generators/notify_user/notification/notification_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_notification ⇒ Object
6 7 8 9 10 |
# File 'lib/generators/notify_user/notification/notification_generator.rb', line 6 def generate_notification template "notification.rb.erb", "app/notifications/#{name.underscore}.rb" puts "If you wish this notification to be unsubscribable add it to the unsubscribable_notifications array in the initializer" end |
#generate_view_scaffolds ⇒ Object
12 13 14 15 16 17 |
# File 'lib/generators/notify_user/notification/notification_generator.rb', line 12 def generate_view_scaffolds template "email_template.html.erb.erb", "app/views/notify_user/#{name.underscore}/action_mailer/notification.html.erb" template "mobile_sdk_template.html.erb.erb", "app/views/notify_user/#{name.underscore}/mobile_sdk/notification.html.erb" template "mobile_sdk_template.html.erb.erb", "app/views/notify_user/#{name.underscore}/mobile_sdk/aggregate_notifications.html.erb" template "email_layout_template.html.erb.erb", "app/views/notify_user/layouts/action_mailer.html.erb" end |