Skip to content

Commit

Permalink
remove mongoid
Browse files Browse the repository at this point in the history
  • Loading branch information
imranansari committed Apr 26, 2013
1 parent 563ab06 commit 00071cf
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions api.rb
Expand Up @@ -4,16 +4,7 @@

class API < Sinatra::Base

# MongoDB configuration
Mongoid.configure do |config|
if ENV['MONGOHQ_URL']
conn = Mongo::Connection.from_uri(ENV['MONGOHQ_URL'])
uri = URI.parse(ENV['MONGOHQ_URL'])
config.master = conn.db(uri.path.gsub(/^\//, ''))
else
config.master = Mongo::Connection.from_uri("mongodb://localhost:27017").db('test')
end
end


# Models
class Counter
Expand Down

0 comments on commit 00071cf

Please sign in to comment.