Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #19 from thekindofme/development

Replace the buggy next_migration_number implementation with what ActiveR...
  • Loading branch information...
commit f7a0b08a3a7170b9107e4f926c33cbeaf5cddce6 2 parents 1ecb68e + 44512ad
@muratguzel authored
Showing with 2 additions and 11 deletions.
  1. +2 −11 lib/generators/letsrate/letsrate_generator.rb
View
13 lib/generators/letsrate/letsrate_generator.rb
@@ -1,5 +1,6 @@
require 'rails/generators/migration'
-class LetsrateGenerator < Rails::Generators::NamedBase
+require 'rails/generators/active_record'
+class LetsrateGenerator < ActiveRecord::Generators::Base
include Rails::Generators::Migration
source_root File.expand_path('../templates', __FILE__)
@@ -35,15 +36,5 @@ def create_cacheable_migration
desc "migration is creating ..."
def create_migration
migration_template "migration.rb", "db/migrate/create_rates.rb"
- end
-
-
- private
- def self.next_migration_number(dirname)
- if ActiveRecord::Base.timestamped_migrations
- Time.now.utc.strftime("%Y%m%d%H%M%S%L")
- else
- "%.3d" % (current_migration_number(dirname) + 1)
- end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.