Sha256: 0ea5c21fc3d7a315b4b2562c3adb9e85ba75c66d9ce1fa84818490e9f2fd6bba

Contents?: true

Size: 289 Bytes

Versions: 3

Compression:

Stored size: 289 Bytes

Contents

require 'erb'
db = YAML.load(ERB.new(File.read('./config/database.yml')).result)[ServiceTemplate.env]
ActiveRecord::Base.establish_connection(db)
ActiveRecord::Base.logger = ServiceTemplate::Logger.logger if ServiceTemplate.env.development?
ActiveRecord::Base.include_root_in_json = false

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
service_template-0.5.2 lib/service_template/generators/templates/scaffold/config/initializers/active_record.rb
service_template-0.5.1 lib/service_template/generators/templates/scaffold/config/initializers/active_record.rb
service_template-0.5.0 lib/service_template/generators/templates/scaffold/config/initializers/active_record.rb