Permalink
Browse files

Inherit from ActiveRecord::Generators::Base instead

  • Loading branch information...
1 parent c9fb84c commit 44512ad1e7eeeec8933d8de402040e531b707fe0 @thekindofme thekindofme committed Feb 26, 2013
Showing with 2 additions and 10 deletions.
  1. +2 −10 lib/generators/letsrate/letsrate_generator.rb
@@ -1,6 +1,6 @@
require 'rails/generators/migration'
-require 'rails/generators/active_model'
-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__)
@@ -36,13 +36,5 @@ def create_cacheable_migration
desc "migration is creating ..."
def create_migration
migration_template "migration.rb", "db/migrate/create_rates.rb"
- end
-
-
- private
- # Implement the required interface for Rails::Generators::Migration.
- def self.next_migration_number(dirname)
- next_migration_number = current_migration_number(dirname) + 1
- ActiveRecord::Migration.next_migration_number(next_migration_number)
end
end

0 comments on commit 44512ad

Please sign in to comment.