Class: DeviseMultipleTokenAuth::AddPushNotificationFunctionalityGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DeviseMultipleTokenAuth::AddPushNotificationFunctionalityGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/devise_multiple_token_auth/add_push_notification_functionality_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
11 12 13 14 |
# File 'lib/generators/devise_multiple_token_auth/add_push_notification_functionality_generator.rb', line 11 def self.next_migration_number(path) sleep 1 Time.now.utc.strftime("%Y%m%d%H%M%S") end |
Instance Method Details
#create_migrations ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/devise_multiple_token_auth/add_push_notification_functionality_generator.rb', line 16 def create_migrations filepath = "#{self.class.source_root}/migrations/add_push_notification_columns_to_devices.rb" name = File.basename(filepath) migration_template "migrations/#{name}", "db/migrate/#{name}" # Dir["#{self.class.source_root}/migrations/*.rb"].sort.each do |filepath| # name = File.basename(filepath) # migration_template "migrations/#{name}", "db/migrate/#{name}" # end end |