Sha256: 650adc108306cc935933caf001fbafa57659e5b61ed45c01e899c8bd9f5f5835
Contents?: true
Size: 603 Bytes
Versions: 15
Compression:
Stored size: 603 Bytes
Contents
class <%= @name.camelcase %>::Application <%- unless @no_database -%> default_dbconfig_file = File.expand_path('../../../config/database.yml', __FILE__) <%- if @database != 'mongo' || @database != 'mongodb' -%> # ActiveRecord connection require 'active_record' if File.exist? default_dbconfig_file ActiveRecord::Base.configurations = YAML::load(open(default_dbconfig_file)) else raise Errno::ENOENT end ActiveRecord::Base.establish_connection environment <% else -%> # MongoID connections Mongoid.load!(default_dbconfig_file, environment) <% end -%> <% end -%> end
Version data entries
15 entries across 15 versions & 1 rubygems