Sha256: 2a59cf3c973045eac09df896a3dd744a50dc07de67d905edbb9da5c01b4d96bc

Contents?: true

Size: 282 Bytes

Versions: 5

Compression:

Stored size: 282 Bytes

Contents

require 'erb'
if ENV['DATABASE_URL']
  ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
else
  db = YAML.load(ERB.new(File.read('./config/database.yml')).result)[Gris.env]
  ActiveRecord::Base.establish_connection(db)
end
ActiveRecord::Base.include_root_in_json = false

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gris-0.2.3 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.2.2 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.2.1 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.2.0 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.1.7 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb