Class: Communify::Generators::PushNotificationGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/communify/generators/push_notification/push_notification_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_communify_log_modelObject



13
14
15
# File 'lib/communify/generators/push_notification/push_notification_generator.rb', line 13

def copy_communify_log_model
  template "device_model.erb", "app/models/device.rb"
end

#copy_initializerObject



17
18
19
# File 'lib/communify/generators/push_notification/push_notification_generator.rb', line 17

def copy_initializer
  template "fcmpush_initializer.erb", "config/initializers/fcmpush.rb"
end

#copy_migrationObject



9
10
11
# File 'lib/communify/generators/push_notification/push_notification_generator.rb', line 9

def copy_migration
  template "device_migration.erb", "db/migrate/#{DateTime.now.to_formatted_s(:number)}_create_devices.rb", migration_version: migration_version
end