Moves ORM specific code to lib/impressionist/:orm/models. Adds mongo_mapper models.
Adds config/initializers/impression.rb file on install.
This commit is contained in:
1 parent
6c18d5b52c
commit
1c3f809da8
13 files changed
+102
-25
No files matched your search
@@ -2,6 +2,11 @@ module Impressionist
|
||||
module Generators
|
||||
class ImpressionistGenerator < Rails::Generators::Base
|
||||
hook_for :orm
|
||||
source_root File.expand_path('../templates', __FILE__)
|
||||
|
||||
def copy_config_file
|
||||
template 'impression.rb', 'config/initializers/impression.rb'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
module MongoMapper
|
||||
module Generators
|
||||
class ImpressionistGenerator < Rails::Generators::Base
|
||||
# Empty for now, need it for generating the config file without
|
||||
# triggering other ORM's generators.
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
# Use this hook to configure impressionist parameters
|
||||
Impressionist.setup do |config|
|
||||
# Define ORM. Could be :active_record (default) and :mongo_mapper
|
||||
# config.orm = :active_record
|
||||
end
|
||||
Reference in new issue
Block a user