Class: UserNotifier::Generators::NotificationGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Defined in:
lib/generators/user_notifier/notification/notification_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_migrationObject



12
13
14
# File 'lib/generators/user_notifier/notification/notification_generator.rb', line 12

def copy_migration
  migration_template "migration.rb", "db/migrate/create_#{notifications_table_name}.rb"
end

#notifications_table_nameObject



8
9
10
# File 'lib/generators/user_notifier/notification/notification_generator.rb', line 8

def notifications_table_name
  "#{table_name.singularize}_notifications"
end