Class: NotifyUser::NotificationGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/notify_user/notification/notification_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_notificationObject



6
7
8
# File 'lib/generators/notify_user/notification/notification_generator.rb', line 6

def generate_notification
  template "notification.rb.erb", "app/notifications/#{name.underscore}.rb"
end

#generate_view_scaffoldsObject



10
11
12
13
14
# File 'lib/generators/notify_user/notification/notification_generator.rb', line 10

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 "email_layout_template.html.erb.erb", "app/views/notify_user/layouts/action_mailer.html.erb"
end