Sha256: cdd728f268b8141ac383695cfb32bec126f496106ab187fa27264d5b53e7bcb1
Contents?: true
Size: 599 Bytes
Versions: 7
Compression:
Stored size: 599 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
7 entries across 7 versions & 1 rubygems