fixed #96, fixed generator for orms

This commit is contained in:
Antonio C Nalesso Moreira 2013-07-14 23:36:06 +01:00
parent 0e437313fd
commit 74847f2d04
3 changed files with 9 additions and 4 deletions

View File

@ -4,6 +4,7 @@ module ActiveRecord
include Rails::Generators::Migration include Rails::Generators::Migration
source_root File.join(File.dirname(__FILE__), 'templates') source_root File.join(File.dirname(__FILE__), 'templates')
# FIX, why is this implementing rails behaviour?
def self.next_migration_number(dirname) def self.next_migration_number(dirname)
sleep 1 sleep 1
if ActiveRecord::Base.timestamped_migrations if ActiveRecord::Base.timestamped_migrations

View File

@ -1,5 +1,6 @@
# Use this hook to configure impressionist parameters # Use this hook to configure impressionist parameters
Impressionist.setup do |config| #Impressionist.setup do |config|
# Define ORM. Could be :active_record (default), :mongo_mapper or :mongoid # Define ORM. Could be :active_record (default), :mongo_mapper or :mongoid
# config.orm = :active_record # config.orm = :active_record
end #end
Impressionist.orm = :<%= options.orm if options.orm %>

View File

@ -1,2 +1,5 @@
# Define ORM. Could be :active_record (default) and :mongo_mapper # Use this hook to configure impressionist parameters
#Impressionist.config.orm = :mongoid Impressionist.setup do |config|
# Define ORM. Could be :active_record (default), :mongo_mapper or :mongoid
# config.orm = :active_record
end