Merge pull request #17 from lennart/bugfix/issue-12 - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 30080afbe22a8edec5bf9ab5995dfe4a3c841b9a
(DIR) parent 9dcbbc9188b7f1749a7997cff911484d8cc84f24
(HTM) Author: Martin Kvlr <martin@sauspiel.de>
Date: Mon, 5 Nov 2012 01:52:31 -0800
Merge pull request #17 from lennart/bugfix/issue-12
make sure we use Thor style source_root for migration generator
Diffstat:
M generators/reportable_migration/re… | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/generators/reportable_migration/reportable_migration_generator.rb b/generators/reportable_migration/reportable_migration_generator.rb
@@ -2,11 +2,10 @@ class ReportableMigrationGenerator < Rails::Generators::Base
include Rails::Generators::Migration
+ source_root File.expand_path('../templates/', __FILE__)
+
def create_migration
- migration_template(
- File.join(File.dirname(__FILE__), 'templates', 'migration.rb'),
- 'db/migrate/create_reportable_cache.rb'
- )
+ migration_template('migration.rb', 'db/migrate/create_reportable_cache.rb')
end
def self.next_migration_number(dirname)