Class: GoogleAnalyticsPageViewRanking::MigrationGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/google_analytics_page_view_ranking/migration/migration_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



9
10
11
# File 'lib/generators/google_analytics_page_view_ranking/migration/migration_generator.rb', line 9

def self.next_migration_number(path)
  Time.now.utc.strftime("%Y%m%d%H%M%S")
end

Instance Method Details

#create_model_fileObject



13
14
15
# File 'lib/generators/google_analytics_page_view_ranking/migration/migration_generator.rb', line 13

def create_model_file
  migration_template "create_page_views.rb", "db/migrate/create_page_views.rb"
end