From 4a009f54e91be7b60ac554ce1ddbf3dcdf1d0bef Mon Sep 17 00:00:00 2001 From: Antonio C Nalesso Moreira Date: Sun, 14 Jul 2013 23:54:42 +0100 Subject: [PATCH] updated impressionist initializer --- lib/generators/templates/impression.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 %>