diff --git a/lib/generators/templates/impression.rb b/lib/generators/templates/impression.rb index 2130c45..d54ffcf 100644 --- a/lib/generators/templates/impression.rb +++ b/lib/generators/templates/impression.rb @@ -3,4 +3,6 @@ # Define ORM. Could be :active_record (default), :mongo_mapper or :mongoid # config.orm = :active_record #end -Impressionist.orm = :<%= options.orm if options.orm %> + +<% orm = options.orm.match(/mongoid|active_record|mongomapper/) %> +<%= "Impressionist.orm = :#{options.orm}" if String === options.orm %>