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.5.8 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.5.7 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.5.6 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.5.5 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.5.4 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.5.3 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.5.2 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.5.1 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.5.0 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.9 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.8 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.7 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.6 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.5 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.4 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.3 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.2 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.4.0 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.3.9 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb
gris-0.3.8 lib/gris/generators/templates/scaffold/config/initializers/active_record.rb