class UserNotifier::Generators::NotificationGenerator

Public Instance Methods

copy_migration() click to toggle source
# 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_name() click to toggle source
# File lib/generators/user_notifier/notification/notification_generator.rb, line 8
def notifications_table_name
  "#{table_name.singularize}_notifications"
end

Private Instance Methods

is_user_model?() click to toggle source
# File lib/generators/user_notifier/notification/notification_generator.rb, line 21
def is_user_model?
  table_name.singularize == user_model_name
end
user_model_name() click to toggle source
# File lib/generators/user_notifier/notification/notification_generator.rb, line 17
def user_model_name
  UserNotifier.user_class_name.downcase
end