Sha256: 923f3d78236beb8f9a20bf9cf6752969c30250b80f3f6f2190840f852cdec783

Contents?: true

Size: 309 Bytes

Versions: 28

Compression:

Stored size: 309 Bytes

Contents

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
# prevent deprecation warning
ActiveRecord::Base.raise_in_transactional_callbacks = true

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
gris-0.3.7 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.3.6 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.3.4 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.3.3 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.3.2 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.3.1 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.3.0 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.2.4 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb