Skip to content
This repository
Browse code

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
Murat GUZEL authored

Showing 1 changed file with 2 additions and 11 deletions. Show diff stats Hide diff stats

  1. +2 11 lib/generators/letsrate/letsrate_generator.rb
13 lib/generators/letsrate/letsrate_generator.rb
... ... @@ -1,5 +1,6 @@
1 1 require 'rails/generators/migration'
2   -class LetsrateGenerator < Rails::Generators::NamedBase
  2 +require 'rails/generators/active_record'
  3 +class LetsrateGenerator < ActiveRecord::Generators::Base
3 4 include Rails::Generators::Migration
4 5
5 6 source_root File.expand_path('../templates', __FILE__)
@@ -35,15 +36,5 @@ def create_cacheable_migration
35 36 desc "migration is creating ..."
36 37 def create_migration
37 38 migration_template "migration.rb", "db/migrate/create_rates.rb"
38   - end
39   -
40   -
41   - private
42   - def self.next_migration_number(dirname)
43   - if ActiveRecord::Base.timestamped_migrations
44   - Time.now.utc.strftime("%Y%m%d%H%M%S%L")
45   - else
46   - "%.3d" % (current_migration_number(dirname) + 1)
47   - end
48 39 end
49 40 end

0 comments on commit f7a0b08

Please sign in to comment.
Something went wrong with that request. Please try again.