Skip to content

Instantly share code, notes, and snippets.

@veesahni
veesahni / Gemfile
Created September 9, 2011 17:49
Integrating Padrino w/ Mongoid & delayed_job on Heroku
gem 'delayed_job'
gem 'delayed_job_mongoid'
gem 'thin'
gem 'heroku'
@veesahni
veesahni / gist:1143152
Created August 12, 2011 22:40
auto incrementing id w/ mongoid
# I strongly suggest using object id's instead of auto incrementing id's
# but since you're here, I'm assuming you've already got your heart set!
# First, create a counter via mongodb console
db.counter.insert({_id:"something",count:0})
# Now, automatically use the counter on save
class Something