class Notifiable::Generators::InstallGenerator
Public Class Methods
next_migration_number(path)
click to toggle source
# File lib/generators/notifiable/install/install_generator.rb, line 14 def self.next_migration_number(path) unless @prev_migration_nr @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i else @prev_migration_nr += 1 end @prev_migration_nr.to_s end
Public Instance Methods
copy_initializer_file()
click to toggle source
# File lib/generators/notifiable/install/install_generator.rb, line 32 def copy_initializer_file copy_file "initializer.rb", "config/initializers/#{app_name}.rb" end
copy_migrations()
click to toggle source
# File lib/generators/notifiable/install/install_generator.rb, line 23 def copy_migrations migration_template "create_notifiable_apps.rb", "db/migrate/create_notifiable_apps.rb" migration_template "create_notifiable_device_tokens.rb", "db/migrate/create_notifiable_device_tokens.rb" migration_template "create_notifiable_notifications.rb", "db/migrate/create_notifiable_notifications.rb" migration_template "create_notifiable_statuses.rb", "db/migrate/create_notifiable_statuses.rb" end
Private Instance Methods
app_name()
click to toggle source
# File lib/generators/notifiable/install/install_generator.rb, line 37 def app_name "notifiable" end