refactored the generator code a little - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit e5c3ffa50f586ab54e8ebc46fd74351bcc2716a8
(DIR) parent f56d70f25f401b315602837df8fbba97969a6e77
(HTM) Author: Marco Otte-Witte <marco.otte-witte@simplabs.com>
Date: Mon, 19 Apr 2010 14:29:02 +0200
refactored the generator code a little
Diffstat:
M generators/reportable_migration/re… | 2 +-
A generators/reportable_migration/te… | 0
C generators/reportable_migration/te… | 0
M generators/reportable_migration/te… | 2 +-
4 files changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/generators/reportable_migration/reportable_migration_generator.rb b/generators/reportable_migration/reportable_migration_generator.rb
@@ -5,7 +5,7 @@ if Saulabs::Reportable::IS_RAILS3
include Rails::Generators::Migration
def create_migration
- migration_template File.join(File.dirname(__FILE__), 'templates', 'migration.erb'), 'db/migrate/create_reportable_cache'
+ migration_template File.join(File.dirname(__FILE__), 'templates', 'migration-rails3.rb'), 'db/migrate/create_reportable_cache.rb'
end
def self.next_migration_number(dirname)
(DIR) diff --git a/generators/reportable_migration/templates/migration-rails3.erb b/generators/reportable_migration/templates/migration-rails3.erb
(DIR) diff --git a/generators/reportable_migration/templates/migration.erb b/generators/reportable_migration/templates/migration-rails3.rb
(DIR) diff --git a/generators/reportable_migration/templates/migration.erb b/generators/reportable_migration/templates/migration.erb
@@ -1,4 +1,4 @@
-class CreateReportableCache < ActiveRecord::Migration
+class <%= class_name %> < ActiveRecord::Migration
def self.up
create_table :reportable_cache, :force => true do |t|