Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP on Heroku demo app

branch: master Demo App

This app shows how to use the databasedotcom and omniauth gems to interact with data stored on from a heroku app using the addon.


#from your app dir
heroku addons:add database-com
heroku config | grep DATABASE_COM_URL 
cp keys.rv keys.rb.sample

use value from heroku as your ENV var

bundle install
bundle exec foreman start

Look, ma. No ActiveRecord!

(creating models)

To create models, login through the addon page from your heroku account.

  • Create a custom object called "Product"
  • call the name field "Name"
  • give it a price field
  • give it a description field
  • give it an image_url field

Or just delete the ProductController and use your own models!

Special features

We're using ::const_missing to allow us to dynamically materialize the model objects.

Logging in

OmniAuth is handling the login. Credentials are stored in the session and a connection is established with each request.

OmniAuth has a bug that causes it to drop the "s" part of https, so we have to override it in the omniauth initializer.

Change this in config/initializers/omniauth.rb

if Rails.env.production? 
  OmniAuth.config.full_host = ""
Something went wrong with that request. Please try again.