lib/padrino-gen/generators/components/orms/mongoid.rb in padrino-gen-0.10.2 vs lib/padrino-gen/generators/components/orms/mongoid.rb in padrino-gen-0.10.3

- old
+ new

@@ -27,10 +27,10 @@ MONGO def setup_orm require_dependencies 'bson_ext', :require => 'mongo' require_dependencies 'mongoid' - require_dependencies('SystemTimer', :require => 'system_timer') if RUBY_VERSION =~ /1\.8/ + require_dependencies('SystemTimer', :require => 'system_timer') if RUBY_VERSION =~ /1\.8/ && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby') create_file("config/database.rb", MONGOID.gsub(/!NAME!/, @app_name.underscore)) end MONGOID_MODEL = (<<-MODEL) unless defined?(MONGOID_MODEL) class !NAME!